您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
自动跳转至主站桌面版
// ==UserScript== // @name 南+ 自动跳转主站桌面版 // @description 自动跳转至主站桌面版 // @namespace https://greasyfork.org/zh-CN/users/948411 // @version 1.3 // @author Moe // @license MIT // @match https://*.south-plus.net/* // @match https://*.east-plus.net/* // @match https://*.spring-plus.net/* // @match https://*.summer-plus.net/* // @match https://*.snow-plus.net/* // @match https://*.white-plus.net/* // @match https://*.south-plus.org/* // @match https://south-plus.net/* // @match https://east-plus.net/* // @match https://spring-plus.net/* // @match https://summer-plus.net/* // @match https://snow-plus.net/* // @match https://white-plus.net/* // @match https://south-plus.org/* // @icon https://www.south-plus.net/favicon.ico // @grant none // ==/UserScript== (function() { 'use strict'; const url = new URL(window.location.href); if (url.pathname == '/simple/index.php') { const paramPattern = /^t([0-9]+)(?:_([0-9]+))?(?:\.html)+$/; const param = url.searchParams.keys().next().value; const matchResult = param.match(paramPattern); const threadId = matchResult[1]; const page = matchResult[2]; if (threadId != null) { if (page != null && page >= 1) { window.location.replace(`https://www.south-plus.net/read.php?tid-${threadId}-fpage-0-toread--page-${page}.html`); } else { window.location.replace(`https://www.south-plus.net/read.php?tid-${threadId}.html`); } } } else if (url.host != 'www.south-plus.net') { url.host = 'www.south-plus.net'; window.location.replace(url); } })();