AllFaucet True Same-Tab Rotator

Rotates TRX → XRP → LTC → XLM automatically in the same tab, waits for CAPTCHA, claims once per faucet

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

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

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

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

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

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.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name         AllFaucet True Same-Tab Rotator
// @namespace    https://allfaucet.xyz/
// @version      1.1
// @description  Rotates TRX → XRP → LTC → XLM automatically in the same tab, waits for CAPTCHA, claims once per faucet
// @author       Rubystance
// @license      MIT
// @match        https://allfaucet.xyz/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    const faucets = [
        'trx',
        'xrp',
        'ltc',
        'xlm'
    ];

    const WAIT_AFTER_CLAIM_MS = 5000;
    const CHECK_INTERVAL_MS = 1000;

    function getCurrentFaucetIndex() {
        const url = window.location.href;
        return faucets.findIndex(f => url.includes(f));
    }

    function getNextFaucetUrl() {
        const currentIndex = getCurrentFaucetIndex();
        const nextIndex = (currentIndex + 1) % faucets.length;
        return `https://allfaucet.xyz/faucet/currency/${faucets[nextIndex]}`;
    }

    function recaptchaSolved() {
        const response = document.querySelector('textarea[name="g-recaptcha-response"]');
        return !response || response.value.length > 0;
    }

    function claimCurrentFaucet() {
        const claimBtn = document.querySelector('button.btn.btn-primary[type="submit"]');
        if (!claimBtn) return false;

        const interval = setInterval(() => {
            if (recaptchaSolved()) {
                clearInterval(interval);
                console.log('Claim clicked on', window.location.href);
                claimBtn.click();

                setTimeout(() => {
                    window.location.href = getNextFaucetUrl();
                }, WAIT_AFTER_CLAIM_MS);
            }
        }, CHECK_INTERVAL_MS);

        return true;
    }

    function goToAnyFaucetFromDashboard() {

        const faucetLinks = Array.from(document.querySelectorAll('a[href*="/faucet/currency/"]'));
        if (faucetLinks.length > 0) {
            const firstFaucet = faucetLinks[0].href;
            console.log('Going to faucet:', firstFaucet);
            window.location.href = firstFaucet;
        } else {
            console.log('No faucet links found on dashboard');
        }
    }

    if (window.location.pathname === '/dashboard') {
        goToAnyFaucetFromDashboard();
    } else {
        if (!claimCurrentFaucet()) {

            setTimeout(() => {
                window.location.href = getNextFaucetUrl();
            }, WAIT_AFTER_CLAIM_MS);
        }
    }

})();