March 7, 2011, 3:13 p.m.
posted by jared
Remove URL Redirections
Cut out the middleman and make links point directly to where you want to go.
Many portal sites use redirection links for links that point to other sites. The link first goes to a tracking page on the portal, which logs your click and sends you on your way to the external site. Not only is this an invasion of privacy, but it's also slower, since you need to load the tracking page before you are redirected to the page you actually want to read. This hack detects such redirection links and converts them to direct links that take you straight to the final destination.
This user script runs on all pages, except for a small list of pages where it is known to cause problems with false positives. It uses the document.links collection to find all the links on the page and checks whether the URL of the link includes another URL within it. If it finds one, it extracts it and unescapes it, and replaces the original URL.
Running the Hack
Before installing the user script, go to http://www.yahoo.com and search for greasemonkey. In the list of search results, each linked page is really a redirect through Yahoo!'s servers, as shown in Figure.
Yahoo! Redirection URL
Now, install the user script (Tools Install This User Script), go back to http://www.yahoo.com, and execute the same search. The link to the search result page now points directly to http://dream.sims.berkeley.edu/~ryanshaw/wordpress/2005/02/18/greasemonkey-stole-your-job-and-your-business-model/, as shown in Figure.
Yahoo! Direct URL
There are a variety of ways that sites can redirect links through a tracking page. This script doesn't handle all of them, but it handles the most common cases and a few special cases used by popular sites (such as Yahoo!). The author maintains a weblog at http://0x539.blogspot.com/ where you can check for updates to this script.