No GoogleHK

Make Google.com.HK redirect to Google.com.

  1. // ==UserScript==
  2. // @name No GoogleHK
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description Make Google.com.HK redirect to Google.com.
  6. // @author Redirect
  7. // @match https://www.google.com.hk/
  8. // @icon https://www.google.com/images/branding/googleg/1x/googleg_standard_color_128dp.png
  9. // @connect www.google.com.hk
  10. // @include *://www.google.com.hk/*
  11. // @grant GM_getValue
  12. // @grant GM.getValue
  13. // @grant GM_setValue
  14. // @grant GM.setValue
  15. // @grant GM_addStyle
  16. // @grant GM_getResourceURL
  17. // @grant GM_listValues
  18. // @grant GM_getResourceUrl
  19. // @grant GM.getResourceUrl
  20. // @grant GM_xmlhttpRequest
  21. // @grant GM_getResourceText
  22. // @grant GM_registerMenuCommand
  23. // @grant unsafeWindow
  24. // ==/UserScript==
  25.  
  26. (function() {
  27. 'use strict';
  28. var test = window.location.href;
  29. if (test == 'https://www.google.com.hk/'|| test == 'http://www.google.com.hk/'|| test == 'https://www.google.com.hk'|| test == 'http://www.google.com.hk'|| test == 'https:\\\\www.google.com.hk\\'|| test == 'http:\\\\www.google.com.hk\\'|| test == 'https:\\\\www.google.com.hk'|| test == 'http:\\\\www.google.com.hk'){
  30. window.location.href=('https://www.google.com/ncr');
  31. }
  32. else{
  33. if (test.charAt(4)=='s'){
  34. test=test.substring(26);
  35. window.location.href=('https://www.google.com/'+ test);
  36. }
  37. else{
  38. test=test.substring(25);
  39. window.location.href=('https://www.google.com/'+ test);
  40. }
  41. }
  42. })();

QingJ © 2025

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