Auto Claim and Start Earning for FreezeHost

FreezeHost auto coins

// ==UserScript==
// @name         Auto Claim and Start Earning for FreezeHost
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  FreezeHost auto coins
// @author       You
// @match        https://earn.freezehost.pro/start_claim
// @match        https://earn.freezehost.pro/earn
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';
    if (window.location.pathname === '/start_claim') {
        const checkAndClaim = setInterval(() => {
            const btn = document.querySelector('#claimButton');
            if (btn && getComputedStyle(btn).display !== 'none') {
                clearInterval(checkAndClaim);
                document.querySelector('form').submit();
            }
        }, 200);
    }

    if (window.location.pathname === '/earn') {
        setInterval(() => {
            const startEarningLink = document.querySelector('a[href="/start_claim"]');
            if (startEarningLink) {
                startEarningLink.click();
            }
        }, 1500);
    }
})();