I was rather annoyed by this as I use Google a lot when pentesting and often like to copy & paste links from the search results. Instead of getting a direct link to a site, I end up with a huge google.com link. So I decided to write a little Greasemonkey script to fix this:
// ==UserScript== // @name Google Direct Links // @namespace http://blog.teusink.net/ // @description Script that changes annoying new-style Google links to direct links // @include http://google.tld/search?* // @include http://www.google.tld/search?* // ==/UserScript== var allElements, thisElement; allElements = document.evaluate('//*[@onmousedown]',document,null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null); for (var i = 0; i < allElements.snapshotLength; i++) { thisElement = allElements.snapshotItem(i); if(thisElement.nodeName.toUpperCase() == 'A'){ thisElement.removeAttribute('onmousedown'); } }This script removes the onmousedown handlers on all links in Google search results. Another way to achieve this is to disable Javascript on these pages. To use the script paste it into a text file, save it as googledirectlinks.user.js, install Greasemonkey and drag the googledirectlinks.user.js onto a Firefox window (Greasemonkey will prompt you to install the script).
Another nice extension is Adaptive Referer Remover. This add-on allows you to remove Referer headers if they contain certain patterns. So I added the following pattern to prevent sites from seeing what Google query I entered to find them (you could add rules for other Google features as well or even block it entirely):
^http://www\.google\..*search
This add-on refuses to install if you use Firefox 3.5, but it works fine in that version. You can install the Nightly Tester Tools extension, which enables you to install it anyway (or you could edit the .xpi file manually).