Anna's Archive Wait Skipper (v4 Final)

Finds the hidden download button on the slow download page, makes it visible, and clicks it, bypassing the timer entirely.

Versión del día 20/06/2025. Echa un vistazo a la versión más reciente.

// ==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
    });
})();
长期地址
遇到问题?请前往 GitHub 提 Issues。