Auto Claim Claimtrx

Auto claim

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         Auto Claim Claimtrx
// @namespace    http://tampermonkey.net/
// @description  Auto claim
// @author       nubiebot
// @version      1.0
// @match        https://claimtrx.com/faucet*
// @grant        none
// @license      MIT
// ==/UserScript==
 
(function () {
    'use strict';
 
    let solvedDetected = false;
    let claimClicked = false;
 
    const tryClaim = () => {
        if (claimClicked) return;
        const btn = document.querySelector('.btn.fc_btn.mb-2.claim-button.mt-2');
        if (btn) {
            console.log("CLICK → Collect your reward");
            claimClicked = true;
            btn.click();
        }
        const sub = document.querySelector('#subbutt');
        if (sub) {
            console.log("CLICK → Submittng form");
            claimClicked = true;
            sub.click();
            const form = document.querySelector('#fauform');
            if (form) form.submit();
        }
    };
    const observer = new MutationObserver((mutations) => {
        for (const m of mutations) {
            for (const node of m.addedNodes) {
                if (!node) continue;
                if (node.tagName === "IMG" &&
                    node.src &&
                    node.src.startsWith("chrome-extension://") &&
                    node.src.includes("success.png")
                ) {
                    console.log("Extension solved detected via image");
                    solvedDetected = true;
                    tryClaim();
                }
                if (node.textContent &&
                    node.textContent.toLowerCase().includes("solved")
                ) {
                    console.log("Extension solved detected via text");
                    solvedDetected = true;
                    tryClaim();
                }
            }
        }
    });
 
    observer.observe(document.body, {
        childList: true,
        subtree: true
    });
 
})();