您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Zamienia "great", "ok", "meh" na "300", "100", "50" na wynikach, beatmapach i meczach w osu!
// ==UserScript== // @name osu! Replace Hit Labels (Great/Ok/Meh → 300/100/50) // @namespace https://osu.ppy.sh // @version 1.2 // @description Zamienia "great", "ok", "meh" na "300", "100", "50" na wynikach, beatmapach i meczach w osu! // @author (you) // @match https://osu.ppy.sh/scores/* // @match https://osu.ppy.sh/beatmapsets/* // @match https://osu.ppy.sh/community/matches/* // @grant none // @run-at document-idle // ==/UserScript== (function () { 'use strict'; const replacements = { 'great': '300', 'ok': '100', 'meh': '50', }; function replaceTextInElements(selector) { const elements = document.querySelectorAll(selector); elements.forEach(el => { const text = el.textContent.trim().toLowerCase(); if (replacements[text]) { el.textContent = replacements[text]; } }); } function runReplacementsForCurrentPage() { const url = window.location.href; if (url.includes('/scores/')) { replaceTextInElements('.score-stats__stat-row--label'); } if (url.includes('/beatmapsets/')) { replaceTextInElements('.beatmap-score-top__stat-header'); replaceTextInElements('.beatmap-scoreboard-table__header--hitstat'); } if (url.includes('/community/matches/')) { replaceTextInElements('.score-stats__stat-row--label'); replaceTextInElements('.mp-history-player-score__stat-label'); } } // Initial run runReplacementsForCurrentPage(); // Re-run on dynamic content load const observer = new MutationObserver(() => { runReplacementsForCurrentPage(); }); observer.observe(document.body, { childList: true, subtree: true }); // Handle back/forward navigation window.addEventListener('popstate', () => { // Small delay to ensure DOM is fully loaded after navigation setTimeout(runReplacementsForCurrentPage, 100); }); })();