No GoogleHK

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

이 스크립트를 설치하려면 Tampermonkey, Greasemonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램을 설치해야 합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Userscripts와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 유저 스크립트 관리자 확장 프로그램이 필요합니다.

(이미 유저 스크립트 관리자가 설치되어 있습니다. 설치를 진행합니다!)

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

(이미 유저 스타일 관리자가 설치되어 있습니다. 설치를 진행합니다!)

// ==UserScript==
// @name         No GoogleHK
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Make Google.com.HK redirect to Google.com.
// @author       Redirect
// @match        https://www.google.com.hk/
// @icon         https://www.google.com/images/branding/googleg/1x/googleg_standard_color_128dp.png
// @connect      www.google.com.hk
// @include      *://www.google.com.hk/*
// @grant        GM_getValue
// @grant        GM.getValue
// @grant        GM_setValue
// @grant        GM.setValue
// @grant        GM_addStyle
// @grant        GM_getResourceURL
// @grant        GM_listValues
// @grant        GM_getResourceUrl
// @grant        GM.getResourceUrl
// @grant        GM_xmlhttpRequest
// @grant        GM_getResourceText
// @grant        GM_registerMenuCommand
// @grant        unsafeWindow
// ==/UserScript==

(function() {
    'use strict';
    var test = window.location.href;
    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'){
        window.location.href=('https://www.google.com/ncr');
    }
    else{
        if (test.charAt(4)=='s'){
            test=test.substring(26);
            window.location.href=('https://www.google.com/'+ test);
        }
        else{
            test=test.substring(25);
            window.location.href=('https://www.google.com/'+ test);
        }
    }
})();