Free-Tether Auto Click on Timer End

Automatically click the "Roll Number" button when the timer ends.

  1. // ==UserScript==
  2. // @name Free-Tether Auto Click on Timer End
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.5
  5. // @description Automatically click the "Roll Number" button when the timer ends.
  6. // @author ALEN
  7. // @icon https://www.google.com/s2/favicons?sz=64&domain=free-tether.com
  8. // @match https://www.free-tether.com/free/*
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14.  
  15. // Function to check the timer
  16. const checkTimer = () => {
  17. const minutesElement = document.querySelector('#cislo1'); // Minutes element
  18. const secondsElement = document.querySelector('#cislo2'); // Seconds element
  19.  
  20. if (minutesElement && secondsElement) {
  21. const minutes = parseInt(minutesElement.textContent.trim(), 10);
  22. const seconds = parseInt(secondsElement.textContent.trim(), 10);
  23.  
  24. // Check if the timer is at 00:00
  25. if (minutes === 0 && seconds === 0) {
  26. console.log('Timer ended. Attempting to click the Roll Number button.');
  27. const rollButton = document.querySelector('.btn-lg.btn.btn-success'); // Replace with the correct selector for the Roll Number button
  28. if (rollButton) {
  29. rollButton.click();
  30. console.log('Roll Number button clicked.');
  31. } else {
  32. console.warn('Roll Number button not found.');
  33. }
  34. }
  35. } else {
  36. console.warn('Timer elements not found.');
  37. }
  38. };
  39.  
  40. // Check the timer every second
  41. setInterval(checkTimer, 3600000);
  42. })();