Google always in com

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

Από την 25/10/2017. Δείτε την τελευταία έκδοση.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

You will need to install an extension such as Tampermonkey to install this script.

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name         Google always in com
// @version      2017.10.25.2055
// @description  Redirects Google from local TLD to ".com" top level domain (ncr, no country redirect, gws_rd)
// @namespace    https://greasyfork.org/en/users/30-opsomh
// @include      *.google.*
// @exclude      *.google.com/*
// @grant        none
// @run-at       document-start
// ==/UserScript==

var url = new URL(location.href)

//http://techxt.com/list-of-all-google-domains/1373/
//https://www.google.com/supported_domains
var re = /\.google\.[a-z]{2,3}(?:\.[a-z]{2})?$/;
if(re.test(url.hostname))
{
    console.log('Google always in com:', url.hostname)
    url.searchParams['gws_rd'] = 'cr';
    url.hostname = url.hostname.replace(re, '.google.com');
    location.replace(url.href);
}