Unhijacking Google Search Results

A userscript to disable Google Search results link indirections.

When you copy a link to a Google search result, Google hijacks it with an internal redirect link. Instead of www.wikipedia.org, you end up with something like www.google.de/url?sa=t&rct=j&q… on your clipboard. This is pretty inconvenient if you want to share or save the URL somewhere.

I made a userscript that disables this so you always get the direct link to the search result.

It took a while finding the source of the redirection in Google’s Javascript. The culprit is a global function rwt. To disable it, the userscript simply defines an empty non-configurable function with the same name rwt. The key is the non-configurability which makes it impossible for Google to override our empty rwt function.

Works like a charm.

Download the userscript here. You can install it in your browser with a userscript manager such as Tampermonkey or Greasemonkey.