您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Automatically reloads the page at the end of each race.
// ==UserScript== // @name NitroType Auto Reload // @namespace https://github.com/Ray-Adams // @version 2.0.0 // @description Automatically reloads the page at the end of each race. // @author Ray Adams/Nate Dogg // @match https://www.nitrotype.com/race // @match https://www.nitrotype.com/race/* // @run-at document-end // @grant none // ==/UserScript== const options = { timerMs: 1000, reloadWhenDisqualified: true }; (() => { 'use strict'; let letters, lastLetter; if (options.reloadWhenDisqualified) { const dqObserver = new MutationObserver(() => { if (document.querySelector('.modal--error')) { dqObserver.disconnect(); location.reload(); } }); dqObserver.observe(raceContainer, {childList: true}); } const lessonObserver = new MutationObserver(() => { if (document.querySelector('.dash-copy')) { lessonObserver.disconnect(); letters = document.querySelectorAll('.dash-letter'), lastLetter = letters[letters.length - 2]; lastLetterObserver.observe(lastLetter, {attributes: true}); } }); const lastLetterObserver = new MutationObserver((mutations) => { for (let mutation of mutations) { if (mutation.target.getAttribute('class').includes('is-correct')) { lastLetterObserver.disconnect(); setTimeout(() => location.reload(), options.timerMs); } } }); lessonObserver.observe(document.querySelector('.dash-center'), {childList: true}); console.info('Auto Reload Activated.'); })()
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址