Redirect Google CN

Redirect Google CN to Google Global!

Από την 11/08/2020. Δείτε την τελευταία έκδοση.

// ==UserScript==
// @name        Redirect Google CN
// @namespace   https://github.com/darkatse
// @version     0.11
// @description Redirect Google CN to Google Global!
// @author      techstay
// @match       *://*.google.cn/*
// @grant       none
// @run-at      document-start
// ==/UserScript==


if (/\.html$/.test (location.pathname) ) {
    var newHost     = location.host.replace (/\.cn$/, ".com");
    var newURL      = location.protocol + "//" +
        newHost                  +
        location.pathname        +
        location.search          +
        location.hash
    ;
    location.replace (newURL);
}