您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Redirects old and broken links from Nexus Mods to the new links
当前为
// ==UserScript== // @name Redirect old Nexus Mods links // @description Redirects old and broken links from Nexus Mods to the new links // @version 0.1 // @namespace Violentmonkey Scripts // @match https://*.nexusmods.com/* // @grant none // @run-at document-start // ==/UserScript== (function() { var href = document.location.href; var match = href.match(/:\/\/([a-z]+)\.nexusmods\.com\/mods\//); if (match) { if (match[1].startsWith("static")) return; document.location = href.replace(/:\/\/[^/]*\/mods\//, "://www.nexusmods.com/" + match[1] + "/mods/"); } match = href.match(/:\/\/([a-z]+)\.nexusmods\.com\/downloads\/+file\.php.*?[?^]id=([0-9]+)/); if (match) { document.location = href.replace(/:\/\/[^/]*\/.*/, "://www.nexusmods.com/" + match[1] + "/mods/" + match[2]); } match = href.match(/(:\/\/(?:www\.)?nexusmods\.com\/[^/]*)\/+downloads\/+file\.php.*?[?^]id=([0-9]+)/); if (match) { document.location = href.replace(/:\/\/[^/]*\/.*/, match[1] + "/mods/" + match[2] + "?tab=files"); } })();