Posts Tagged ‘Safari Extension’

I Don’t Want to Be Counted, I Just Want Links

Tuesday, November 8th, 2011

I am an avid Google user and even though the quality of results has suffered in the last few years, I still use Google almost exclusively when researching a topic. When the question is simple, a visit to Wikipedia or Stackoverflow will suffice but when things get complicated I tend to open several of the search results for browsing. Inevitably the time comes when I realize I want to open a previous result that was prematurely closed but is now key – unfortunately Google has left my history useless.

I’ll never find that page even though I distinctly remember having “Step by Step” in the title and a favicon that had some sort of diagonal stripes.

Why is my history so useless? Is my computer broken or has Google broken the internet? Google actually displays the actual link under each title of the page to let users know what page they will be visiting. The link is also the actual href attribute of the link and is displayed at the footer status bar during a mouse over. But why isn’t it the link I get when I click or copy it? Because when the time comes to use a link Google uses Javascript to replace the link with a redirect to their own servers in order to keep track of what links users are clicking on (except when the link points to their own Google domain like images or maps).

As wonderful as that information might be to Google in improving their results rankings and knowing what results I favor most, it’s messing with my history as well as my ability to copy and paste a link (“Copy Link” shown above picks up the modified link) for a blog post or to email to a friend.

There must be a way to get the old direct-to-result Google back. There are no options to disable this behavior that I could find, not even in the name of privacy. After some searching I ran into a Japanese gentleman with the same linking sensibilities as mine who has written a Grease Monkey script that solves the issue. But in this day and age I want a simple Safari Extension that I can install and manage natively in Safari. After poking around for such a script (Dear Apple, could we please have search functionality in the extension gallery) I decided to build my own. I know nothing about Safari Extensions or programming one, but I am a Mac developer and I know what I want, so I started developing.

One hour and three lines of code later I present to you Google Direct. The Safari Extension that will remove the redirects from the Google links by stripping the “onmouseover” events Google uses to trick the href link into the replacement link.

With Google Direct Safari extension installed I am a happy camper, my history is looking unique and identifiable (the same results but now with names and favicons).

‘Copy link’ also gives me the crisp, short, original URL instead of a indecipherable mess:

http://en.wikipedia.org/wiki/Croissant

Vs.

http://www.google.com/url?sa=t&rct=j&q=croisants&source=web&cd=1&
ved=0CCgQFjAA&url=http%3A%2F%2Fwww.cooks.com%2Frec%2Fsearch%2F0%2C1-
0%2Ccroisants%2CFF.html&ei=cCG4TtSiI6TX0QHD5NTRBw&usg
=AFQjCNF7fQtjSwE9hpdNkIV9Ytl7orz-Og

Are there any downsides? Depends on where you stand. I am indeed depriving Google of knowing what links I followed and approximating how long I stayed (how long it took me to come back and click on another link of the same result set). On my side of the fence, where I usually stand, it’s an added bonus that I now also control a little more of my privacy with my new extension.

P.S. I ended up using Fine Cooking Classic Croissants recipe for making croissants. Now it has an elegant white orange hat and a title that was easy to spot in my history when I went back two days later – after tasting the results – to add it to my permanent bookmarks.