Auto Clicker for Bitcoin wallets on privatekeys.app

Simple script that clicks the random page button every 1.5 seconds until it finds "Active Wallets Found" on the body of the site then stops.

Від 13.02.2024. Дивіться остання версія.

// ==UserScript==
// @name         Auto Clicker for Bitcoin wallets on privatekeys.app
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Simple script that clicks the random page button every 1.5 seconds until it finds "Active Wallets Found" on the body of the site then stops.
// @author       donobon
// @match        https://privatekeys.app/*
// @license MIT
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    console.log('Auto Clicker script initiated');

    let lastClickTime = 0;

    function clickButton() {
        const now = Date.now();

        if (now - lastClickTime >= 1500) {
            const button = document.querySelector('[aria-label="Random page"]');
            if (button) {
                button.click();
                lastClickTime = now;
            }
        }
    }

    function checkForAPIResponseAndStopCondition(mutationsList, observer) {
        for (let mutation of mutationsList) {
            if (mutation.type === 'childList') {
                const apiResponse = document.querySelector('span.text-green-500');
                if (apiResponse && apiResponse.innerText.includes('200 OK')) {
                    setTimeout(() => {
                        if (!document.body.innerText.includes("Active Wallets Found")) {
                            clickButton();
                        } else {
                            console.log('Active Wallets Found - Stopping clicks');
                            observer.disconnect();
                        }
                    }, 1500);
                }
            }
        }
    }

    const observer = new MutationObserver(checkForAPIResponseAndStopCondition);
    observer.observe(document.body, { childList: true, subtree: true });
})();