Free-Tether 自动点击

每30分钟刷新页面并点击Roll Number按钮

当前为 2024-12-09 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Free-Tether 自动点击
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description 每30分钟刷新页面并点击Roll Number按钮
  6. // @author You
  7. // @match https://www.free-tether.com/free/*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13.  
  14. // 每30分钟刷新页面
  15. setInterval(function() {
  16. location.reload();
  17. }, 600000); // 30分钟 = 1800000毫秒
  18.  
  19. // 页面加载后30秒点击按钮
  20. window.onload = function() {
  21. setTimeout(function() {
  22. const rollButton = document.querySelector('.btn-lg.btn.btn-success'); // 使用类名选择器
  23. if (rollButton) {
  24. rollButton.click();
  25. }
  26. }, 30000); // 等待30秒后点击按钮
  27. };
  28. })();