Google always in com

Redirects Google from local TLD to ".com" top level domain (ncr, no country redirect, gws_rd)

  1. // ==UserScript==
  2. // @name Google always in com
  3. // @version 2018.12.24.1207
  4. // @description Redirects Google from local TLD to ".com" top level domain (ncr, no country redirect, gws_rd)
  5. // @namespace https://gf.qytechs.cn/en/users/30-opsomh
  6. // @include *.google.*/*
  7. // @include *.blogspot.*/*
  8. // @exclude *.google.com/*
  9. // @exclude *.blogspot.com/*
  10. // @grant none
  11. // @inject-into auto
  12. // @run-at document-start
  13. // ==/UserScript==
  14.  
  15. var url = new URL(location.href);
  16.  
  17. //http://techxt.com/list-of-all-google-domains/1373/
  18. //https://www.google.com/supported_domains
  19. //https://ipfs.io/ipfs/QmXoypizjW3WknFiJnKLwHCnL72vedxjQkDDP1mXWo6uco/wiki/List_of_Google_domains.html
  20. var re = /(\.google|\.blogspot)\.[a-z]{2,3}(?:\.[a-z]{2})?$/;
  21. if(re.test(url.hostname))
  22. {
  23. window.stop();
  24. console.log('Google always in com:', url.hostname);
  25. url.searchParams.set('gws_rd', 'cr');
  26. url.hostname = url.hostname.replace(re, '$1.com');
  27. location.assign(url.href);
  28. }

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址