您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
红石中继站去中间页0.1
当前为
// ==UserScript== // @name 红石中继站去中间页 // @version 0.1 // @description 红石中继站去中间页0.1 // @author 28074 // @match *://www.mczwlt.net/* // @icon https://www.mczwlt.net/favicon.ico // @license MIT // @namespace http://greasyfork.icu/users/1429810 // ==/UserScript== (function() { 'use strict'; function processLinks() { const links = document.querySelectorAll('a[href*="/go-external?url="]'); links.forEach(link => { const href = link.getAttribute('href'); const match = href.match(/\/go-external\?url=([^&]+)/); if (match && match[1]) { try { const decodedUrl = decodeURIComponent(decodeURIComponent(match[1])); link.href = decodedUrl; link.onclick = null; link.addEventListener('click', e => { e.stopImmediatePropagation(); }, true); } catch (e) { console.error('URL解码失败:', e); } } }); } processLinks(); const observer = new MutationObserver(processLinks); observer.observe(document.body, { childList: true, subtree: true }); })();