Greasy Fork is available in English.

蓝奏云失效域名重定向

将蓝奏云失效的域名重定向为www.lanzoux.com,保留路径不变

// ==UserScript==
// @name         蓝奏云失效域名重定向
// @namespace    ChatGPT
// @version      1.0
// @description  将蓝奏云失效的域名重定向为www.lanzoux.com,保留路径不变
// @match      *://*.lanzous.com/*
// @match      *://*.lanzouz.com/*
// @match      *://*.lanzouj.com/*
// @match      *://*.lanzoud.com/*
// @run-at     document-start
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    var currentUrl = window.location.href;
    var newUrl = currentUrl.replace(new URL(currentUrl).hostname, 'www.lanzoux.com');

    if (currentUrl !== newUrl) {
        window.location.replace(newUrl);
    }
})();