Here's a more elementary proof, which has the advantage of not using the assumption that the homomorphism is continuous. (It is a very minor adaptation of the proof of Theorem 3.2 in Cullen's Matrices and Linear Transformations, an early step in Cullen's axiomatic development of the determinant.)
Let $\varphi\colon \text{GL}_n(\mathbb{R})\to\mathbb{R}_\times$ be a group homomorphism. Denote elementary matrices as follows:
- $I_{kR_i}$ is the matrix obtained by multiplying the $i$th row of the identity matrix by $k$.
- $I_{kR_i+R_j}$ is the matrix obtained by adding $k$ times the $i$ row of the identity matrix to the $j$th row.
- $I_{R_i\leftrightarrow R_j}$ is the matrix obtained by exchanging the $i$th and $j$th rows of the identity matrix.
Let $i\colon\mathbb{R}_\times\to\text{GL}_n(\mathbb{R})$ be defined by $i(x) = I_{xR_1}$. Note that $i$ is a homomorphism. We will show that, for all $A\in\text{GL}_n(\mathbb{R})$, we have
$$ \varphi(A) = \varphi(i(\det(A))) \tag{$\ast$} $$
This establishes the desired result with $f=\varphi\circ i$.
First, ($\ast$) holds for $A=I_{xR_1}$, since then $A=i(\det(A))$.
Second, from the identity
$$ I_{kR_j} = I_{R_1\leftrightarrow R_j} I_{kR_1} I_{R_1\leftrightarrow R_j} $$
we obtain
\begin{align*}
\varphi(I_{kR_j})
&= \varphi(I_{R_1\leftrightarrow R_j} I_{kR_1} I_{R_1\leftrightarrow R_j}) \\
&= \varphi(I_{R_1\leftrightarrow R_j} I_{R_1\leftrightarrow R_j} I_{kR_1})
&&\text{(since $\mathbb{R}_\times$ is abelian)} \\
&= \varphi(I_{kR_1})
\end{align*}
which yields that ($\ast$) holds for elementary matrices of type 1.
Similarly, from the identity
$$ I_{kR_j+R_i} = I_{k^{-1}R_j} I_{1R_j+R_i} I_{kR_j} $$
we get $\varphi(I_{kR_j+R_i}) = \varphi(I_{1R_j+R_i})$ for all $k\in\mathbb{R}$ (except $k=0$, which can be handled separately). But since $I_{1R_j+R_i}^2=I_{2R_j+R_i}$, this yields $\varphi(I_{1R_j+R_i})=1$, whence $\varphi(I_{kR_j+R_i})=1$, verifying ($\ast$) for elementary matrices of type 2.
Similarly again, from the identity
$$ I_{R_i\leftrightarrow R_j} = I_{(-1)R_i} I_{1R_i+R_j} I_{(-1)R_j+R_i} I_{1R_i+R_j} $$
we get $\varphi(I_{R_i\leftrightarrow R_j}) = \varphi(i(-1))$, which establishes ($\ast$) for elementary matrices of type 3.
Finally, since elementary matrices generate $\text{GL}_n(\mathbb{R})$, this establishes ($\ast$) for all invertible matrices.