CryptoFaucetScan Auto Claim

Auto fill email and auto click claim buttons when timers are ready

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name         CryptoFaucetScan Auto Claim
// @namespace    https://cryptofaucetscan.com/
// @version      1.0
// @description  Auto fill email and auto click claim buttons when timers are ready
// @author       Rubystance
// @license      MIT
// @match        https://cryptofaucetscan.com/crypto/*
// @grant        none
// ==/UserScript==

(function () {
    'use strict';

    const EMAIL = "YOUR_FAUCETPAY_EMAIL"; // ← Your faucetpay email here

    function waitForElement(selector, timeout = 30000) {
        return new Promise((resolve, reject) => {
            const start = Date.now();
            const timer = setInterval(() => {
                const el = document.querySelector(selector);
                if (el) {
                    clearInterval(timer);
                    resolve(el);
                }
                if (Date.now() - start > timeout) {
                    clearInterval(timer);
                    reject("Element not found: " + selector);
                }
            }, 400);
        });
    }

    function waitForClaimReady(button, timeout = 60000) {
        return new Promise((resolve, reject) => {
            const start = Date.now();
            const interval = setInterval(() => {
                const text = button.innerText.toUpperCase();
                const disabled =
                    button.disabled ||
                    button.classList.contains("disabled") ||
                    button.getAttribute("aria-disabled") === "true";

                if (
                    !disabled &&
                    (text.includes("CLAIM NOW") || text.includes("READY NEXT CLAIM"))
                ) {
                    clearInterval(interval);
                    resolve();
                }

                if (Date.now() - start > timeout) {
                    clearInterval(interval);
                    reject("Claim button did not become available");
                }
            }, 500);
        });
    }

    async function run() {
        const url = location.href;

        if (url.endsWith("/crypto/")) {
            const emailInput = await waitForElement("#email");
            emailInput.value = EMAIL;
            emailInput.dispatchEvent(new Event("input", { bubbles: true }));

            (await waitForElement("#captcha")).click();
            (await waitForElement(".btn-start")).click();
        }

        if (document.querySelector("#notificationConfirmBtn")) {
            (await waitForElement("#notificationConfirmBtn")).click();
        }

        if (url.includes("/crypto/dashboard")) {
            (await waitForElement("a[href*='/crypto/faucet']")).click();
        }

        if (url.endsWith("/crypto/faucet")) {
            (await waitForElement(
                "button[onclick*=\"goToCryptoPage('doge')\"]"
            )).click();
        }

        if (url.includes("/crypto/faucet/doge")) {
            const claimBtn = await waitForElement("#claimButton");

            console.log("⏳ Waiting for claim timer...");

            await waitForClaimReady(claimBtn);

            claimBtn.click();
            console.log("⚡ Claim executed");
        }
    }

    run().catch(console.error);
})();