EarnCryptoWRS Auto Faucet

Fills email and ONLY submits after IconCaptcha is truly solved + 10s delay on faucet

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         EarnCryptoWRS Auto Faucet
// @namespace    http://tampermonkey.net/
// @version      1.5
// @description  Fills email and ONLY submits after IconCaptcha is truly solved + 10s delay on faucet
// @author       Rubystance
// @license      MIT
// @match        https://earncryptowrs.in/*
// @match        https://earncryptowrs.in/app/dashboard*
// @match        https://earncryptowrs.in/app/faucet*
// @grant        none
// ==/UserScript==

(function () {
    'use strict';

    const WALLET_EMAIL = 'YOUR_FAUCETPAY_EMAIL_HERE'; // << YOUR FAUCETPAY EMAIL

    function waitUntil(checkFn, okFn, interval = 700) {
        const t = setInterval(() => {
            try {
                if (checkFn()) {
                    clearInterval(t);
                    okFn();
                }
            } catch (_) {}
        }, interval);
    }

    function iconCaptchaSolved() {
        const tokenInputs = document.querySelectorAll(
            'input[type="hidden"][name*="captcha"], input[type="hidden"][name*="icon"]'
        );
        const tokenReady = [...tokenInputs].some(i => i.value && i.value.length > 10);

        const successClass =
            document.querySelector('.iconcaptcha-success') ||
            document.querySelector('[data-ic-status="success"]');

        const submitBtn = document.querySelector('button[type="submit"], input[type="submit"]');
        const btnEnabled = submitBtn &&
            !submitBtn.disabled &&
            !submitBtn.classList.contains('disabled');

        return (tokenReady || successClass) && btnEnabled;
    }

    if (location.pathname === '/') {

        waitUntil(
            () => document.querySelector('input[name="wallet"]'),
            () => {
                const input = document.querySelector('input[name="wallet"]');
                input.value = WALLET_EMAIL;
                input.dispatchEvent(new Event('input', { bubbles: true }));
            }
        );

        waitUntil(
            () => document.querySelector('form'),
            () => {
                const form = document.querySelector('form');
                console.log('[Auto] Waiting for IconCaptcha (LOGIN)…');

                waitUntil(
                    () => iconCaptchaSolved(),
                    () => {
                        console.log('[Auto] IconCaptcha solved → submitting LOGIN');
                        setTimeout(() => form.submit(), 800);
                    },
                    900
                );
            }
        );
    }

    if (location.pathname === '/app/dashboard') {
        waitUntil(
            () => document.querySelector('a[href*="currency=DOGE"]'),
            () => {
                document.querySelector('a[href*="currency=DOGE"]').click();
            }
        );
    }

    if (location.pathname.includes('/app/faucet')) {

        waitUntil(
            () => document.querySelector('form'),
            () => {
                const form = document.querySelector('form');
                console.log('[Auto] Waiting for IconCaptcha (FAUCET)…');

                waitUntil(
                    () => iconCaptchaSolved(),
                    () => {
                        console.log('[Auto] IconCaptcha solved → waiting 10 seconds…');

                        setTimeout(() => {
                            console.log('[Auto] 10 seconds passed → submitting FAUCET');
                            form.submit();
                        }, 10000);
                    },
                    900
                );
            }
        );
    }

})();