Responsive image

Gosling - 2023-10-01 14:48 [GF]
打开不同域名的链接老是要重新登录,于是写了个规则,基于浏览器拓展,不管打开什么域名都会跳转到south-plus.net。也不知道论坛之后有没有人写过。

使用浏览器拓展Header Editor,或任何可以重定向的插件。

首先安装插件,Chrome、Firefox可在拓展商店安装。

打开插件新建规则,名字随便取,【Rule type/规则类型】选择【Redirect request/重定向请求】。

【Match type/匹配类型】选择【Regular expression/正则表达式】。

【Match rules 匹配规则】
https:\/\/[a-z]*\.?(south(?=-plus\.org)|(?<=\.)south|north|east|spring|summer|snow|white|level|least|soul|blue)-plus\.(net|org)\/(.*)

【Redirect to 重定向】
https://www.south-plus.net/$3

保存。完成。

如果偏好其他域名则在匹配规则和重定向中间对调一下。

例如我想跳转north-plus,就将所有north换成south,south换成north:
https:\/\/[a-z]*\.?(north(?=-plus\.org)|(?<=\.)north|south|east|spring|summer|snow|white|level|least|soul|blue)-plus\.(net|org)\/(.*)

https://north-plus.net/$3


3138f383 - 2023-10-01 14:52 [B1F]
牛的  


NPC111 - 2023-10-01 15:00 [B2F]
技术贴啊!


maple - 2023-10-01 15:06 [B3F]
  


深剑sama - 2023-10-01 15:30 [B4F]
强啊


03ac6fd6 - 2023-10-01 15:36 [B5F]
chrome有个扩展叫《redirector》


嘤嘤嘤 - 2023-10-01 15:52 [B6F]
好好好


帅气的苦主 - 2023-10-01 17:01 [B7F]
很好,感谢


黑士酱 - 2023-10-01 17:04 [B8F]
不愿安装偶尔一用的程序,路过。


花之萌宝 - 2023-10-01 17:50 [B9F]
mark


我爱智能汉化 - 2023-10-01 18:38 [B10F]
看起来不错


楽園の少女 - 2023-10-01 19:16 [B11F]
顺便写了个油猴脚本
// ==UserScript==
// @name         Redirect to level-plus.net
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Redirect specific domains to level-plus.net
// @author       You
// @match        *://*.south-plus.net/*
// @match        *://*.north-plus.net/*
// @match        *://*.east-plus.net/*
// @match        *://*.spring-plus.net/*
// @match        *://*.summer-plus.net/*
// @match        *://*.snow-plus.net/*
// @match        *://*.white-plus.net/*
// @match        *://*.level-plus.net/*
// @match        *://*.least-plus.net/*
// @match        *://*.soul-plus.net/*
// @match        *://*.blue-plus.net/*
// @match        *://*.south-plus.org/*
// @match        *://*.north-plus.org/*
// @match        *://*.east-plus.org/*
// @match        *://*.spring-plus.org/*
// @match        *://*.summer-plus.org/*
// @match        *://*.snow-plus.org/*
// @match        *://*.white-plus.org/*
// @match        *://*.level-plus.org/*
// @match        *://*.least-plus.org/*
// @match        *://*.soul-plus.org/*
// @match        *://*.blue-plus.org/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    const currentURL = window.location.href;
    const regex = /https:\/\/(?:bbs\.)?(south|north|east|spring|summer|snow|white|level|least|soul|blue)-plus\.(net|org)\/(.*)/
    const match = currentURL.match(regex);

    if (match && !currentURL.startsWith("https://www.south-plus.net")) {
        // 第三个匹配组包含路径
        const newPath = match[3];
        const newURL = `https://www.south-plus.net/${newPath}`;
        window.location.replace(newURL);
    }
})();


54guiling - 2023-10-01 19:18 [B12F]
CPU熔断


皮卡超车 - 2023-10-01 20:24 [B13F]
引用
引用第8楼9bb83736于2023-10-01 17:04发表的  :
不愿安装偶尔一用的程序,路过。

我作为开发过油猴脚本和浏览器扩展的人来说,你说的是对的,而我也是这么做的


e88f6be5 - 2023-10-03 20:58 [B14F]
优秀


89e7be95 - 2023-10-03 23:00 [B15F]


思源 - 2023-10-22 11:42 [B16F]
感谢分享,先收藏下


跳跳瓶 - 2023-10-22 11:52 [B17F]

https://www.south-plus.net/read.php?tid-1321191.html
很久以前有人做过了,这个插件可以和凛+混用






桌面版


Powered by SP Project v1.0 © 2010-2019
Time 0.001900 second(s),query:3 Gzip enabled


Top