// ==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 // @downloadURL none // ==/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); }