您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
跳过5s等待
// ==UserScript== // @name TouchGal 自动跳转 // @namespace http://tampermonkey.net/ // @version 2.1 // @description 跳过5s等待 // @match https://www.touchgal.us/* // @grant none // @license MIT // @run-at document-start // ==/UserScript== (function() { 'use strict'; let lastUrl = location.href; function autoRedirect() { const currentUrl = location.href; if (currentUrl === lastUrl) return; lastUrl = currentUrl; if (currentUrl.includes('/redirect?url=')) { const targetUrl = getUrlParameter('url'); if (targetUrl) { window.location.href = decodeURIComponent(targetUrl); } } } function getUrlParameter(name) { const urlParams = new URLSearchParams(window.location.search); return urlParams.get(name); } autoRedirect(); const originalPushState = history.pushState; const originalReplaceState = history.replaceState; history.pushState = function() { originalPushState.apply(history, arguments); setTimeout(autoRedirect, 100); }; history.replaceState = function() { originalReplaceState.apply(history, arguments); setTimeout(autoRedirect, 100); }; window.addEventListener('popstate', function() { setTimeout(autoRedirect, 100); }); window.addEventListener('hashchange', function() { setTimeout(autoRedirect, 100); }); })();