TypeRacer 作弊工具

此脚本图一乐,正常情况不应该使用本脚本

当前为 2023-10-22 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name typeracer.com - Cheats
  3. // @name:zh-CN TypeRacer 作弊工具
  4. // @namespace Violentmonkey Scripts
  5. // @match https://play.typeracer.com/
  6. // @grant GM_registerMenuCommand
  7. // @grant GM_getValue
  8. // @version 0.2
  9. // @author -
  10. // @license 0BSD
  11. // @description You shouldn't use this script or you are going to be banned from taking races.
  12. // @description:zh-CN 此脚本图一乐,正常情况不应该使用本脚本
  13. // ==/UserScript==
  14. 'use strict';
  15.  
  16. let el;
  17.  
  18. const press = (() => {
  19. const _conf = {
  20. bubbles: true,
  21. cancelable: true,
  22. };
  23. const conf2 = {
  24. inputType: "insertText",
  25. };
  26. function press(key) {
  27. el.value += key;
  28. conf2.data = _conf.key = key;
  29. [
  30. new KeyboardEvent('keydown', _conf),
  31. new KeyboardEvent('keypress', _conf),
  32. new InputEvent("input", conf2)
  33. ].forEach(f => el.dispatchEvent(f));
  34. }
  35. return press;
  36. })();
  37.  
  38. const delay = n => new Promise(sol => setTimeout(sol, n));
  39.  
  40. let stop = false;
  41.  
  42. async function main () {
  43. const txt = document.querySelector(".inputPanel div").innerText;
  44. el = document.querySelector(".txtInput");
  45. for (const t of txt) {
  46. if (stop) return;
  47. await delay(GM_getValue("speed_c", 100) + Math.trunc(Math.random() * GM_getValue("speed_v", 30)));
  48. press(t);
  49. }
  50. }
  51.  
  52. GM_registerMenuCommand("停止", () => stop = true);
  53. GM_registerMenuCommand("启动", () => (stop = false, main()));

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址