您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Clicks faucet claim button only once per cycle
// ==UserScript== // @name FaucetEarner // @namespace http://tampermonkey.net/ // @version 2 // @description Clicks faucet claim button only once per cycle // @author 👽 // @match https://faucetearner.org/faucet.php // @grant none // @license MIT // ==/UserScript== (function () { 'use strict'; const MIN_DELAY_MS = 1000; // shortest delay after detecting 00:30–00:59 const MAX_DELAY_MS = 4000; // longest delay to simulate human reaction const MIN_SECONDS = 30; const MAX_SECONDS = 59; let alreadyClicked = false; let scriptStopped = false; function simulateRealClick(element) { if (!element) return; const opts = { bubbles: true, cancelable: true, view: window }; ['mouseover', 'mousedown', 'mouseup', 'click'].forEach(evt => { element.dispatchEvent(new MouseEvent(evt, opts)); }); console.log('[AutoClicker] ✔️ Simulated human-like click.'); } function detectAntiBotSystems() { const bodyText = document.body.innerText.toLowerCase(); return ( bodyText.includes('cloudflare') || bodyText.includes('checking your browser') || bodyText.includes('verify you are human') || bodyText.includes('recaptcha') || bodyText.includes('hcaptcha') || document.querySelector('iframe[src*="hcaptcha"]') || document.querySelector('iframe[src*="recaptcha"]') || document.querySelector('div[class*="captcha"]') || document.querySelector('div[id*="captcha"]') ); } function getRandomDelay() { return Math.floor(Math.random() * (MAX_DELAY_MS - MIN_DELAY_MS + 1)) + MIN_DELAY_MS; } function checkAndScheduleClick() { if (scriptStopped) return; if (detectAntiBotSystems()) { console.warn('[AutoClicker] 🛑 Anti-bot system detected. Halting script.'); scriptStopped = true; return; } const countdownEl = document.querySelector('#claimCountdown'); const claimBtn = document.querySelector('#claimButton'); if (!countdownEl || !claimBtn || claimBtn.disabled || claimBtn.offsetParent === null) { alreadyClicked = false; return; } const timeText = countdownEl.innerText.trim(); // e.g., "00:47" const [minutes, seconds] = timeText.split(':').map(Number); // Valid window: 00:30 to 00:59 if (minutes === 0 && seconds >= MIN_SECONDS && seconds <= MAX_SECONDS && !alreadyClicked) { const delay = getRandomDelay(); console.log(`[AutoClicker] ⏳ Timer: ${timeText} — will click in ${delay}ms.`); alreadyClicked = true; setTimeout(() => { if (!detectAntiBotSystems() && claimBtn && claimBtn.offsetParent !== null) { simulateRealClick(claimBtn); } else { console.warn('[AutoClicker] 🚫 Anti-bot triggered or button missing during delay. Skipping click.'); scriptStopped = true; } }, delay); } // Reset click state outside valid range if (minutes !== 0 || seconds < MIN_SECONDS || seconds > MAX_SECONDS) { alreadyClicked = false; } } window.addEventListener('load', () => { console.log('[AutoClicker] ✅ Started — watching for 00:30 to 00:59 range with random delays.'); setInterval(checkAndScheduleClick, 500); // Poll every 500ms }); })();