Remove tracking script in Google search results


/ Published in: JavaScript
Save to your folder(s)

A recent update to either Google's search results page or Firefox's Tab Mix Plus add-on has prevented a locked tab from opening links in a new tab. This Greasemonkey script removes the tracking code on the Google links that causes the problem. I don't understand what the incompatibility is though, since the tracking script just changes the href attribute at the last minute.

Based on a script at [http://www.searchlores.org/ritz\_google\_anti\_snoop.htm](http://www.searchlores.org/ritz_google_anti_snoop.htm).


Copy this code and paste it in your HTML
  1. // ==UserScript==
  2. // @name Remove Google Tracking Script
  3. // @namespace http://dragonzreef.com/
  4. // @description Removes tracking script in Google search result links
  5. // @include http://www.google.com/search*
  6. // @include https://www.google.com/search*
  7. // ==/UserScript==
  8.  
  9. var rxp = /^.*?\{\s*return true;\s*}$/;
  10. function overwriteRwt()
  11. {
  12. if(rxp.test(unsafeWindow.rwt))
  13. setTimeout(overwriteRwt, 100);
  14. else
  15. unsafeWindow.rwt = function(){ return true; };
  16. }
  17. overwriteRwt();

URL: http://dragonzreef.com/greasemonkey/remove_google_tracking_script.user.js

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.