Google always in com

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

目前為 2017-10-20 提交的版本,檢視 最新版本

// ==UserScript==
// @name         Google always in com
// @version      2017.10.20.1716
// @description  Redirects Google from local TLD to ".com" top level domain (ncr, no country redirect, gws_rd)
// @namespace    https://gf.qytechs.cn/en/users/30-opsomh
// @include      *.google.*
// @exclude      *.google.com/*
// @grant        none
// ==/UserScript==

var url = new URL(location.href)

if(/\.google\.[a-z]{2,10}(\.[a-z]{2,5})?$/.test(url.hostname))
{
    console.log('Google always in com')
    url.searchParams.set('gws_rd', 'cr');
    url.hostname = url.hostname.replace(/\.google\.[a-z]{2,}(\.[a-z]{2,})?$/, '.google.com');
    location.replace(url.href);
}

QingJ © 2025

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