您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
UserScript Metadata Block: This block contains metadata about the script, including its name, namespace, version, description, author, and matching URLs.
// ==UserScript== // @name Simple Nitro Type Auto Typer // @namespace http://tampermonkey.net/ // @version 0.1 // @description UserScript Metadata Block: This block contains metadata about the script, including its name, namespace, version, description, author, and matching URLs. //WPM Setting: The wpm variable is set to 120, which determines the typing speed. //Sleep Function: The sleep function is used to create delays. //TypeWords Function: This function types each character of the words with a small delay between characters and a larger delay between words based on the WPM. //GetTypingText Function: This function extracts the typing text from the page. //StartTyping Function: This function waits for the typing text to appear and then starts the typing process. //Event Listener: The script starts the typing process when the page loads. // @author You // @match https://www.nitrotype.com/race // @grant none // ==/UserScript== (function() { 'use strict'; // Set your desired WPM (Words Per Minute) const wpm = 120; // Function to simulate a delay function sleep(ms) { return new Promise(resolve => setTimeout(resolve, ms)); } // Function to type the words async function typeWords(words) { const wordsArray = words.split(' '); const delay = (60 / wpm) * 1000; // Delay between words based on WPM for (const word of wordsArray) { for (const char of word) { document.dispatchEvent(new KeyboardEvent('keydown', { key: char })); await sleep(50); // Small delay between characters } document.dispatchEvent(new KeyboardEvent('keydown', { key: ' ' })); // Space after each word await sleep(delay); // Delay between words } } // Function to extract the typing text from the page function getTypingText() { const typingTextElement = document.querySelector('.dash-letter'); if (typingTextElement) { return typingTextElement.innerText; } return null; } // Main function to start the typing process async function startTyping() { let typingText = getTypingText(); while (!typingText) { await sleep(1000); // Wait for the typing text to appear typingText = getTypingText(); } await typeWords(typingText); } // Start the typing process when the race starts window.addEventListener('load', startTyping); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址