// ==UserScript== // @name Auto Reload Claimer + Full Panel // @version 3.3 // @description Automatically claims Stake reloads with safe countdown, error retry, failsafe, guaranteed button click, resettable panel, and timestamped last claim tracking. // @author natah3 // @match https://stake.com/* // @match https://stake.games/* // @match https://stake.bet/* // @match https://stake.link/* // @match https://stake1069.com/* // @run-at document-idle // @namespace https://greasyfork.org/users/1514052 // @downloadURL none // ==/UserScript== (function() { 'use strict'; const TARGET_URL = 'https://' + window.location.hostname + '/?tab=rewards&modal=claimReload'; const CLAIM_WAIT_TIME = 610; // 10 min + 10s buffer const ERROR_RETRY_WAIT_TIME = 20 * 1000; const FAILSAFE_LIMIT = 3 * 60 * 1000; // 3 min const BUTTON_RETRY_INTERVAL = 5 * 1000; // try claim button every 5s let claimCounter = parseInt(localStorage.getItem("claimCounter") || "0", 10); let lastClaimTime = localStorage.getItem("lastClaimTime") || "None"; let countdownInterval; let failSafeTimer; let buttonRetryInterval; // Format date (DD/MM/YYYY HH:mm:ss) function formatDate(d) { const day = String(d.getDate()).padStart(2, "0"); const month = String(d.getMonth() + 1).padStart(2, "0"); const year = d.getFullYear(); const hours = String(d.getHours()).padStart(2, "0"); const minutes = String(d.getMinutes()).padStart(2, "0"); const seconds = String(d.getSeconds()).padStart(2, "0"); return `${day}/${month}/${year} ${hours}:${minutes}:${seconds}`; } // Create panel function createPanel() { const panel = document.createElement("div"); panel.id = "auto-reload-claimer-panel"; panel.style.position = "fixed"; panel.style.bottom = "20px"; panel.style.right = "20px"; panel.style.backgroundColor = "rgba(0,0,0,0.7)"; panel.style.color = "#fff"; panel.style.padding = "12px 15px"; panel.style.borderRadius = "10px"; panel.style.zIndex = "9999"; panel.style.fontSize = "14px"; panel.style.fontFamily = "monospace"; panel.innerHTML = `
Auto Reload Claimer
Claims: ${claimCounter}
Last Claim: ${lastClaimTime}
Next Reload in: --:--
`; document.body.appendChild(panel); document.getElementById("arc-reset").addEventListener("click", resetStats); } // Update panel values function updatePanel() { document.getElementById("arc-counter").textContent = claimCounter; document.getElementById("arc-last").textContent = lastClaimTime; } // Countdown timer function startCountdown() { let timeLeft = CLAIM_WAIT_TIME; const timerDisplay = document.getElementById("arc-timer"); clearInterval(countdownInterval); countdownInterval = setInterval(() => { const minutes = Math.floor(timeLeft / 60); const seconds = timeLeft % 60; timerDisplay.textContent = `${String(minutes).padStart(2,"0")}:${String(seconds).padStart(2,"0")}`; if (timeLeft <= 0) { clearInterval(countdownInterval); reloadPage(); } timeLeft--; }, 1000); } // Failsafe (reload if no claim in 3 min) function startFailSafe() { clearTimeout(failSafeTimer); failSafeTimer = setTimeout(() => { reloadPage(); }, FAILSAFE_LIMIT); } // Init function init() { createPanel(); if (window.location.href !== TARGET_URL) { window.location.href = TARGET_URL; } else { tryClaim(); } } function tryClaim() { clearInterval(buttonRetryInterval); // Retry claim button at intervals buttonRetryInterval = setInterval(() => { const claimButton = document.querySelector('button[data-testid="claim-reload"]'); const errorModal = Array.from(document.querySelectorAll("h2")) .find(el => el.textContent.includes("Reload Unavailable")); if (claimButton) { claimButton.click(); clearInterval(buttonRetryInterval); startFailSafe(); setTimeout(waitForCompletionButton, 5000); } else if (errorModal) { clearInterval(buttonRetryInterval); setTimeout(reloadPage, ERROR_RETRY_WAIT_TIME); } }, BUTTON_RETRY_INTERVAL); } function waitForCompletionButton() { const completionButton = document.querySelector('button[data-testid="claim-reward-done"]'); if (completionButton) { completionButton.click(); // Successful claim → update stats claimCounter++; lastClaimTime = formatDate(new Date()); localStorage.setItem("claimCounter", claimCounter); localStorage.setItem("lastClaimTime", lastClaimTime); updatePanel(); startCountdown(); } else { setTimeout(waitForCompletionButton, 2000); } } function reloadPage() { window.location.reload(); } // Reset button handler function resetStats() { claimCounter = 0; lastClaimTime = "None"; localStorage.setItem("claimCounter", claimCounter); localStorage.setItem("lastClaimTime", lastClaimTime); updatePanel(); } window.addEventListener("load", init); })();