Sometimes I encounter Google results pages but as service is unreliable here in China, I often want to get directly to the result rather than having the vain hope of waiting to go through Google.
http://www.google.com.hk/url?q=<SOME QUERY HERE><SOME ARGS HERE>&url=<ESCAPED URI COMPONENT HERE>
It is too much of a pain to type out decodeURIComponent on the relevant portion of the URL, so I worked with the following...
While this bookmarklet will do the trick if already loaded:
var url = window.location.href.match(/[?&]url=([^&]*)(?=&|$)/); url = url && url; window.location = decodeURIComponent(url);
(or in bookmarklet form, courtesy of http://mrcoles.com/bookmarklet/ :)
...usually Firefox just keeps on running, so I made the following page, google-redirect.html
<script> var url = window.location.href.match(/[?&]url=([^&]*)(?=&|$)/); url = url && url; url = decodeURIComponent(url).match(/[?&]url=([^&]*)(?=&|$)/); url = url && url; window.location = decodeURIComponent(url); </script>
...and I made a bookmark leading to it, but leading to:
...and with the keyword "redir", so I could quickly hit ctrl-l to get into the location bar, copy-paste the URL, type "redir" and space and then paste (ctrl-x) to redirect quickly to whatever URL was appended at the end of the URL. Probably sounds convoluted unless you've had to deal with the Google issues as over here. This also has the advantage of not needing the maintenance trouble described above for bookmarklets.