Google Search Only Normal TLDs

Show only .com, .net, .org domains in Google Search results.

  1. // ==UserScript==
  2. // @name Google Search Only Normal TLDs
  3. // @author
  4. // @description Show only .com, .net, .org domains in Google Search results.
  5. // @downloadURL
  6. // @grant
  7. // @homepageURL https://bitbucket.org/INSMODSCUM/userscripts-scripts/src
  8. // @icon
  9. // @include /https?://(www|encrypted).google(.\w+)(.\w+)?/((\?|#|search|webhp).*)?/
  10. // @namespace insmodscum
  11. // @require
  12. // @run-at document-start
  13. // @updateURL
  14. // @version 1.0
  15. // ==/UserScript==
  16.  
  17. // rtfm: http://www.w3schools.com/jsref/obj_location.asp
  18.  
  19. if (! /site%3A.com%20OR%20site%3A.net%20OR%20site%3A.org/.test(window.location.search.substring(1))) {
  20.  
  21. var newURL = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search+"%20(site%3A.com%20OR%20site%3A.net%20OR%20site%3A.org)";
  22.  
  23. window.location.replace (newURL);
  24.  
  25. }