您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork镜像 is available in English.
Finds the hidden download button on the slow download page, makes it visible, and clicks it, bypassing the timer entirely.
当前为
// ==UserScript== // @name Anna's Archive Wait Skipper (v4 Final) // @namespace http://tampermonkey.net/ // @version 4.0 // @description Finds the hidden download button on the slow download page, makes it visible, and clicks it, bypassing the timer entirely. // @author @humbledAlberto // @match *://annas-archive.org/slow_download/* // @grant none // @run-at document-start // ==/UserScript== (function() { 'use strict'; // Selectors for the key elements. The download button is likely hidden with a style attribute. const TIMER_CONTAINER_SELECTOR = '#countdown'; // The div that holds the timer text const HIDDEN_BUTTON_SELECTOR = 'a.btn-primary[style*="display: none"]'; // The download button, specifically when it's hidden const skipTheWait = () => { const timerContainer = document.querySelector(TIMER_CONTAINER_SELECTOR); const downloadButton = document.querySelector(HIDDEN_BUTTON_SELECTOR); // We need both the timer and the hidden button to be present before we act. if (timerContainer && downloadButton) { console.log('Found timer and hidden download button. Performing bypass...'); // --- The Magic --- // 1. Hide the timer's container. timerContainer.style.display = 'none'; // 2. Make the download button visible. Removing the style attribute is often more robust than setting it to 'block'. downloadButton.removeAttribute('style'); // 3. Click the now-visible button to initiate the download. downloadButton.click(); console.log('Bypass successful! Download should start.'); return true; // Indicate success } return false; // Elements not ready yet }; // We use a MutationObserver because the timer and button might be added to the page by JavaScript after initial load. // This is more efficient than setInterval. It waits for the elements to appear. const observer = new MutationObserver((mutationsList, obs) => { if (skipTheWait()) { // Once we succeed, we stop the observer to save resources. obs.disconnect(); console.log('Observer disconnected.'); } }); // Start observing the entire document for changes. observer.observe(document.documentElement, { childList: true, subtree: true }); })();