您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
osu medals
当前为
// ==UserScript== // @name Medals // @namespace http://tampermonkey.net/ // @version 2025-02-04 // @description osu medals // @author brandwagen // @match https://osu.ppy.sh/* // @icon https://www.google.com/s2/favicons?sz=64&domain=ppy.sh // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; const medalMax = 339; let changed = false; function main() { const medalElement = document.querySelectorAll('.value-display__value')[2]; const medalCount = medalElement.textContent; const medalPercentage = (medalCount / medalMax * 100).toFixed(2); medalElement.textContent = `${medalPercentage}% (${medalCount})`; changed = true; } function waitForElement() { const element = document.querySelectorAll('.value-display__value')[2]; if (element) { main(); } else { setTimeout(waitForElement, 100); } } var oldURL = ""; var newURL = window.location.pathname; window.setInterval(function(){ if(oldURL != newURL){ oldURL = newURL; changed = false; setTimeout(waitForElement, 1000); } newURL = window.location.pathname; }, 250); })();