South Star

South+ 链接修复,域名跳转

2024-06-09 या दिनांकाला. सर्वात नवीन आवृत्ती पाहा.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         South Star
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  South+ 链接修复,域名跳转
// @license MIT
// @author       zaypen
// @match        *://*.white-plus.net/*
// @match        *://*.level-plus.net/*
// @match        *://*.spring-plus.net/*
// @match        *://*.summer-plus.net/*
// @match        *://*.north-plus.net/*
// @match        *://*.south-plus.net/*
// @match        *://*.south-plus.org/*
// @match        *://*.east-plus.net/*
// @match        *://*.snow-plus.net/*
// @match        *://*.imoutolove.me/*
// @match        *://www.google.com/*
// @icon         https://www.google.com/s2/favicons?domain=spring-plus.net
// @grant        none
// ==/UserScript==

var target = 'south-plus.net';
var keywords = ['white-plus', 'level-plus', 'spring-plus', 'summer-plus', 'north-plus', 'south-plus', 'east-plus', 'snow-plus', 'imoutolove.me'];
var patterns = keywords.map(k => `(?:(www|bbs)\.)?${k}(?:\.(net|org))?`);

(function() {
    'use strict';
    Array.apply(null, document.getElementsByTagName('a')).forEach(function (a) {
        patterns.forEach(function (pattern) {
            a.href = a.href.replace(pattern, target);
        });
    });
    if (location.hostname !== target && patterns.some(p => location.hostname.match(p))) {
        location.replace(location.href.replace(location.hostname, target));
    }
})();