您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Automatically claims the first "Claim Reload" button every 10 minutes and 20 seconds, clicks off, then repeats. Refreshes after every 3 claims.
- // ==UserScript==
- // @name Stake.bet Auto Claim Reload (First Button) with Timer, Flashing, and Sound
- // @namespace http://tampermonkey.net/
- // @version 3.8
- // @description Automatically claims the first "Claim Reload" button every 10 minutes and 20 seconds, clicks off, then repeats. Refreshes after every 3 claims.
- // @author jfbaby
- // @match https://stake.bet/*
- // @grant none
- // ==/UserScript==
- (function() {
- 'use strict';
- let claimCount = 0;
- let countdownTime = 620; // 10 minutes 20 seconds
- function createTimer() {
- const timer = document.createElement('div');
- Object.assign(timer.style, {
- position: 'fixed', top: '1.5cm', left: '0', backgroundColor: 'black', color: 'white',
- padding: '10px', fontFamily: 'monospace', fontSize: '20px', zIndex: '10000', borderRadius: '5px'
- });
- timer.id = 'countdown-timer';
- timer.textContent = '10:20';
- document.body.appendChild(timer);
- return timer;
- }
- function updateTimer(timer, timeInSeconds) {
- const minutes = Math.floor(timeInSeconds / 60);
- const seconds = timeInSeconds % 60;
- timer.textContent = `${String(minutes).padStart(2, '0')}:${String(seconds).padStart(2, '0')}`;
- timer.style.backgroundColor = timeInSeconds <= 5 ? (timer.style.backgroundColor === 'black' ? 'red' : 'black') : 'black';
- }
- function playSound() {
- const sound = new Audio('https://assets.mixkit.co/active_storage/sfx/1121/1121-preview.mp3');
- sound.volume = 0.5;
- sound.play();
- }
- function forceClick(element) {
- if (!element) return;
- element.scrollIntoView({ behavior: 'smooth', block: 'center' });
- ['mouseover', 'mousedown', 'mouseup', 'click'].forEach(eventType => {
- element.dispatchEvent(new MouseEvent(eventType, { bubbles: true, cancelable: true, view: window }));
- });
- console.log("Tried to force-click the button.");
- }
- function clickClaimReload() {
- let buttons = Array.from(document.querySelectorAll('button'));
- let reloadButton = buttons.find(button => button.innerText.trim().toLowerCase().includes('claim reload'));
- if (reloadButton) {
- console.log('Claim Reload button found!', reloadButton);
- forceClick(reloadButton);
- playSound();
- claimCount++;
- setTimeout(() => {
- let closeButton = document.querySelector('[data-testid="modal-close"]');
- if (closeButton) {
- console.log("Clicking off the box");
- forceClick(closeButton);
- }
- }, 2000);
- } else {
- console.log('Claim Reload button not found!');
- }
- }
- function isOnRewardsPage() {
- return window.location.href.includes("tab=rewards&modal=claimReload");
- }
- function main() {
- if (isOnRewardsPage()) {
- clickClaimReload();
- } else {
- console.log("Navigating to the rewards page...");
- window.history.back();
- }
- }
- const timer = createTimer();
- const timerInterval = setInterval(() => {
- countdownTime -= 1;
- updateTimer(timer, countdownTime);
- if (countdownTime <= 0) {
- countdownTime = 620;
- updateTimer(timer, countdownTime);
- main();
- setTimeout(() => {
- console.log("Clicking back to rewards page");
- window.history.forward();
- }, 30000); // 30 seconds after claiming, go back
- if (claimCount >= 3) {
- setTimeout(() => {
- console.log("Refreshing after 3 claims");
- location.reload();
- }, 60000); // Wait 30 seconds before refreshing
- claimCount = 0;
- }
- }
- }, 1000);
- })();