您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Adds rainbow colors to race text in Nitro Type
// ==UserScript== // @name Nitro Type Rainbow Race Text // @namespace http://tampermonkey.net/ // @version 1.0 // @description Adds rainbow colors to race text in Nitro Type // @author You // @match https://www.nitrotype.com/race* // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; const addRainbowStyle = () => { const style = document.createElement('style'); style.innerHTML = ` @keyframes rainbow { 0%{color:red;} 20%{color:orange;} 40%{color:yellow;} 60%{color:green;} 80%{color:blue;} 100%{color:violet;} } .rainbow-text { animation: rainbow 2s infinite linear; } `; document.head.appendChild(style); }; const applyRainbowText = () => { const raceTextElement = document.querySelector('.dash-copy-container'); if (raceTextElement) { raceTextElement.classList.add('rainbow-text'); } }; addRainbowStyle(); const observer = new MutationObserver(applyRainbowText); observer.observe(document.body, { childList: true, subtree: true }); })();