This is how far I know:
$f$ has a continuous extension to $[0,1]$ if and only if $f$ is uniformly continuous on $(0,1)$.
If $f$ has a continuous extension $G:[0,1]\to[0,1]$, then by compactness of $[0,1]$ we have the uniform continuity of $G$. Since every restriction of a uniformly continuous function is uniformly continuous (If $|x−y|<\delta$ implies $|G(x)−G(y)|<\varepsilon$, then the same implication holds for the restrictions of $F$), this implies the uniform continuity of $f$. And if $f$ is uniformly continuous, then the limits of $f(x)$ at $0$ and at $1$ exist, and
\begin{equation*} G(x)= \begin{cases} \lim_{y\to0} f(y) & \text{if } x=0, \\ f(x) & \text{if } 0 < x < 1, \\ \lim_{y\to1} f(y) & \text{if } x=1. \end{cases} \end{equation*}
is the unique (why?) continuous extension of $f$ to $[0,1]$. Once the existence of the limits is established (how?), the continuity of $G$ at $0$ and at $1$ follows directly from the definitions, and the continuity of $G$ at all points of $(0,1)$ is just the assumed continuity of $f$.
So my problem is that it is already established in the question that $f$ is uniformly continuous on $(0,1)$, which means I can find some sort of an extension to $[0,1]$. But what about a uniformly continuous extension to all of $\Bbb R$?
I am looking for a complete proof of the question.