Autokey helper script - nitro type bot

helper script for autokey

当前为 2023-02-06 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Autokey helper script - nitro type bot
  3. // @namespace https://ginfio.com/giveaways
  4. // @version 3
  5. // @description helper script for autokey
  6. // @match https://www.nitrotype.com/race/*
  7. // @match https://www.nitrotype.com/race
  8. // @license GNU Affero General Public License v3.0
  9. // ==/UserScript==
  10. /*var mdk = 232;
  11. ll="auto_typer.type(everything)";
  12. r3="finish(mdk)";*/
  13.  
  14.  
  15.  
  16. function copyText(e) {
  17. navigator.clipboard.writeText(e)
  18. }
  19.  
  20. function checkForRaceText() {
  21. let e = setInterval(function() {
  22. document.querySelector(".dash-copy") && (copyRaceText(), clearInterval(e))
  23. }, 1e3)
  24. }
  25.  
  26. function reload_page() {
  27. window.location.reload()
  28. }
  29.  
  30. function checkForDisqualified() {
  31. setInterval(function() {
  32. document.querySelector(".modal--raceError") && (copyText("https://ginfio.com"), reload_page())
  33. }, 1e4)
  34. }
  35.  
  36. function after_race() {
  37. let e = setInterval(function() {
  38. document.querySelector(".raceResults") && (reload_page(), copyText("https://ginfio.com"), clearInterval(e))
  39. }, Math.floor(1e3 * Math.random()))
  40. }
  41.  
  42. function copyRaceText() {
  43. setTimeout(function() {
  44. copyText("start_typing|||" + document.querySelector(".dash-copy").textContent)
  45. }, 1e3)
  46. }
  47.  
  48. function checkForContinueButton() {
  49. setInterval(function() {
  50. btns = Array.from(document.querySelectorAll(".btn.btn--primary.btn--fw")), continue_btn = [], 0 < btns.length && (continue_btn = btns.filter(function(e) {
  51. return e.textContent.includes("ntinue")
  52. })), 0 < continue_btn.length ? window.location.reload() : console.log("did't find.")
  53. }, 1e4)
  54. }
  55.  
  56. function refreshJustIncase() {
  57. setTimeout(function() {
  58. window.location.href = "https://www.nitrotype.com/race"
  59. }, 5e4)
  60. }
  61. after_race(), checkForRaceText(), checkForDisqualified(), checkForContinueButton(), refreshJustIncase();