您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Blocks redirects on gojo2.xyz without property overrides
当前为
// ==UserScript== // @name Block gojo2.xyz Redirects (All Pages) - Ultra Safe // @namespace http://tampermonkey.net/ // @version 1.7 // @description Blocks redirects on gojo2.xyz without property overrides // @author You // @match https://gojo2.xyz/* // @run-at document-start // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; console.log("Script injected at document-start on", window.location.href); // Block navigation early window.addEventListener('beforeunload', function(e) { console.log("Navigation attempt detected to:", window.location.href); e.preventDefault(); e.returnValue = ''; }, { capture: true }); // Block setTimeout/setInterval without redefining const originalSetTimeout = window.setTimeout; window.setTimeout = function(fn, delay) { if (typeof fn === 'function') { const fnStr = fn.toString(); if (fnStr.includes('location') || fnStr.includes('redirect') || fnStr.includes('href')) { console.log("Blocked setTimeout redirect attempt:", fnStr); return null; } } return originalSetTimeout(fn, delay); }; const originalSetInterval = window.setInterval; window.setInterval = function(fn, delay) { if (typeof fn === 'function') { const fnStr = fn.toString(); if (fnStr.includes('location') || fnStr.includes('redirect') || fnStr.includes('href')) { console.log("Blocked setInterval redirect attempt:", fnStr); return null; } } return originalSetInterval(fn, delay); }; // Block meta refresh and scripts const observer = new MutationObserver(function(mutations) { mutations.forEach(function(mutation) { // Meta tags const metaTags = document.querySelectorAll('meta[http-equiv="refresh"]'); metaTags.forEach(tag => { console.log("Found meta refresh tag:", tag.content); tag.remove(); console.log("Removed meta refresh tag"); }); // Scripts const scripts = document.querySelectorAll('script'); scripts.forEach(script => { if (script.textContent.includes('location') || script.textContent.includes('redirect') || script.textContent.includes('href')) { console.log("Blocked script with redirect potential:", script.textContent.slice(0, 50) + "..."); script.remove(); } }); }); }); observer.observe(document.documentElement, { childList: true, subtree: true }); console.log("Mutation observer started at document-start"); console.log("Redirect blocker fully active on", window.location.href); })();