您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
自動點擊 "Claim" 按鈕,處理 CAPTCHA 並循環操作
当前为
// ==UserScript== // @name 自動點擊 Claim 按鈕的腳本 // @namespace http://tampermonkey.net/ // @version 1.0 // @description 自動點擊 "Claim" 按鈕,處理 CAPTCHA 並循環操作 // @author Your Name // @match *://*/* // 這裡可以替換為特定的水龍頭網站 URL // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; function clickClaimButton() { const buttons = Array.from(document.querySelectorAll("button, a")); // 查找所有按鈕和鏈接 const claimButton = buttons.find(btn => btn.textContent.trim().toLowerCase() === 'claim'); if (claimButton) { claimButton.click(); console.log('已點擊 Claim 按鈕!'); } else { console.log('找不到 Claim 按鈕。'); } } function refreshPage() { console.log('因為 CAPTCHA 而刷新頁面...'); location.reload(); } function startProcess() { setTimeout(() => { if (document.body.innerText.includes('CAPTCHA')) { refreshPage(); } else { clickClaimButton(); } startProcess(); // 循環調用 }, 10000); // 等待10秒 } // 啟動腳本 startProcess(); })();