Is it possible to get the string displayed in the URL bar using javascript? -
I know that window.location.href sometimes returns something other than the string displayed in the URL bar. Is there a way to get the string displayed in the URL bar in Javascript?
When I go to www.google.com through this user script, then document.location.href is not always "www.google.com" as expected.
Chrome, by default, hides the URI's protocol (see also the comment of @Andy E). location has many properties that you should allow to receive Check the part you want.
Comments
Post a Comment