您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
A score hack for the timestable game in dr frost math!
// ==UserScript== // @name Dr Frost Math Timestable Game Score Hack // @namespace http://tampermonkey.net/ // @version 0.1 // @description A score hack for the timestable game in dr frost math! // @author Jason Huang // @match https://www.drfrostmaths.com/timestables-game.php // @icon https://www.google.com/s2/favicons?sz=64&domain=drfrostmaths.com // @grant none // ==/UserScript== (function() { 'use strict'; function sleep(ms) { return new Promise(resolve => setTimeout(resolve, ms)); } var score = parseInt(prompt("What score would you like to get? (Max 70, does not allow to submit after that.)")) async function performActions() { // Find the button element and click its var button = document.querySelector("a.very-large-button-variant"); if (button) { button.click(); // Wait for the button action to complete (if needed) await sleep(1000); // Find the element and retrieve its text content for (let i = 0; i < score; i++) { console.log("STEP"); await sleep(180); var textBox = document.querySelector("input#calculator-display"); var element = document.querySelector("#question"); if (element) { var textContent = (element.textContent || element.innerText).replace("×", "*").replace("÷", "/"); var answer = parseInt(eval(textContent)); console.log("Text content:", answer); textBox.value = answer; const enterKeyEvent = new KeyboardEvent("keyup", { key: "Enter", keyCode: 13, bubbles: true, cancelable: true, }); textBox.dispatchEvent(enterKeyEvent); } } } } performActions(); })();