xHamster Universal Redirector

Redirects all alternative xHamster domains and language subdomains to the main xhamster.com domain.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

Advertisement:

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

Advertisement:

// ==UserScript==
// @name         xHamster Universal Redirector
// @namespace    http://tampermonkey.net/
// @version      1.1
// @description  Redirects all alternative xHamster domains and language subdomains to the main xhamster.com domain.
// @author       BlueAnivia
// @match        *://*.megaxh.com/*
// @match        *://megaxh.com/*
// @match        *://*.xhamster.com/*
// @match        *://xhamster.com/*
// @match        *://*.xhamster.desi/*
// @match        *://xhamster.desi/*
// @match        *://*.xhamster1.desi/*
// @match        *://xhamster1.desi/*
// @match        *://*.xhamster3.com/*
// @match        *://xhamster3.com/*
// @match        *://*.xhamster2.com/*
// @match        *://xhamster2.com/*
// @match        *://*.xhamster19.com/*
// @match        *://xhamster19.com/*
// @match        *://*.xhopen.com/*
// @match        *://xhopen.com/*
// @match        *://*.xhaccess.com/*
// @match        *://xhaccess.com/*
// @match        *://*.xhbranch5.com/*
// @match        *://xhbranch5.com/*
// @match        *://*.xhamster44.desi/*
// @match        *://xhamster44.desi/*
// @match        *://*.xhbig.com/*
// @match        *://xhbig.com/*
// @match        *://*.xhchannel.com/*
// @match        *://xhchannel.com/*
// @match        *://*.xhofficial.com/*
// @match        *://xhofficial.com/*
// @match        *://*.xhmoon5.com/*
// @match        *://xhmoon5.com/*
// @match        *://*.xhspot.com/*
// @match        *://xhspot.com/*
// @match        *://*.xhtotal.com/*
// @match        *://xhtotal.com/*
// @match        *://*.xhvid.com/*
// @match        *://xhvid.com/*
// @match        *://*.xhwide2.com/*
// @match        *://xhwide2.com/*
// @match        *://*.xhwide5.com/*
// @match        *://xhwide5.com/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=xhamster.com
// @license      MIT
// @grant        none
// @run-at       document-start
// ==/UserScript==

(function() {
    'use strict';

    const currentHost = window.location.hostname;
    const targetHost = "xhamster.com";

    if (currentHost !== targetHost) {
        const newUrl = "https://" + targetHost + window.location.pathname + window.location.search + window.location.hash;

        window.location.replace(newUrl);
    }
})();