CryptoFuture Auto (ON)

Claim Now "OK" and "Go Claim" on all CryptoFuture faucet pages, then refreshes after each cycle

// ==UserScript==
// @name         CryptoFuture Auto (ON)
// @namespace    http://tampermonkey.net/
// @version      1.3
// @description  Claim Now "OK" and "Go Claim" on all CryptoFuture faucet pages, then refreshes after each cycle
// @author       👽
// @match        https://cryptofuture.co.in/faucet/currency/*
// @grant        none
// @license      MIT
// ==/UserScript==

(function () {
    'use strict';

    function claimCycle() {
        setTimeout(() => {
            const claimButton = document.getElementById('subbutt');
            if (claimButton && !claimButton.disabled) {
                console.log("✅ Clicking 'Claim Now'...");
                claimButton.click();
            } else {
                console.log("⏳ 'Claim Now' button not found or disabled.");
            }

            // Wait 1s → Click "OK"
            setTimeout(() => {
                const okButton = document.querySelector('button.swal2-confirm.swal2-styled');
                if (okButton && okButton.offsetParent !== null) {
                    console.log("🟩 Clicking 'OK'...");
                    okButton.click();
                } else {
                    console.log("❌ 'OK' button not found or not visible.");
                }

                // Wait 1s → Click "Go Claim"
                setTimeout(() => {
                    const goClaimButton = Array.from(document.querySelectorAll('a.btn.btn-success, a.btn.btn-primary'))
                        .find(btn => btn.textContent.trim().toLowerCase().includes('go claim'));

                    if (goClaimButton && goClaimButton.offsetParent !== null) {
                        console.log("🔁 Clicking 'Go Claim'...");
                        goClaimButton.click();
                    } else {
                        console.log("❌ 'Go Claim' button not found.");
                    }

                    // Wait 10s → Refresh page
                    setTimeout(() => {
                        console.log("🔄 Refreshing page to restart cycle...");
                        location.reload();
                    }, 10000); // Wait 10 seconds before refresh

                }, 1000); // Wait 1s before "Go Claim"

            }, 1000); // Wait 1s before "OK"

        }, 5000); // Initial 5s wait per cycle
    }

    // Start script 5s after page load
    setTimeout(() => {
        console.log("🚀 Starting full faucet claim loop...");
        claimCycle();
    }, 5000);
})();