M f Auto Claim version 1 minute

Waits for faucet to be ready or detects claimable reward and auto-claims. Pauses if timer is active.

// ==UserScript==
// @name         M f Auto Claim version 1 minute
// @namespace    http://tampermonkey.net/
// @version      1.4
// @description  Waits for faucet to be ready or detects claimable reward and auto-claims. Pauses if timer is active.
// @author       👽
// @match        https://myfaucet.club/faucet*
// @grant        none
// @license      MIT
// ==/UserScript==

(function () {
    'use strict';

    function isRewardReady() {
        const alertBox = document.querySelector('.alert.alert-info.text-center');
        if (!alertBox) return false;

        const text = alertBox.innerText.toLowerCase();
        return text.includes('0 minutes') || text.includes('5 coins every 1 minutes');
    }

    function tryAutoClaim() {
        if (isRewardReady()) {
            console.log('✅ Reward is ready or timer is at 1 minute. Starting auto claim...');
            clearInterval(pollingInterval); // stop checking once we begin

            // Step 1: Wait 2 seconds
            setTimeout(() => {
                const openModalButton = document.querySelector('button.btn.btn-primary.btn-lg[data-bs-target="#claimModal"]');
                if (openModalButton) {
                    openModalButton.click();
                    console.log('Step 1: Clicked "Claim reward" button');

                    // Step 2: Wait 12 seconds
                    setTimeout(() => {
                        const claimButton = document.querySelector('#claimModal button[type="submit"].btn.btn-primary');
                        if (claimButton) {
                            claimButton.click();
                            console.log('Step 2: Clicked submit inside modal');
                        } else {
                            console.warn('⚠️ Submit button not found in modal.');
                        }
                    }, 12000); // 12 seconds
                } else {
                    console.warn('⚠️ Initial claim button not found.');
                }
            }, 2000); // 2 seconds

        } else {
            console.log('⏳ Timer is still running. Waiting for reward to be ready...');
        }
    }

    // Poll every 10 seconds to check if the reward is ready
    const pollingInterval = setInterval(tryAutoClaim, 10000); // 10 seconds
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址