Greasy Fork

Greasy Fork is available in English.

Remove osu! Avatars

Removes pfps in ranking page

当前为 2025-04-13 提交的版本,查看 最新版本

// ==UserScript==
// @name         Remove osu! Avatars
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Removes pfps in ranking page
// @author       nekiak
// @match        https://osu.ppy.sh/*
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    function removeAvatars() {
        document.querySelectorAll('span.avatar.avatar--dynamic-size').forEach(el => {
            el.remove();
        });
    }

    removeAvatars();

    const observer = new MutationObserver(() => {
        removeAvatars();
    });

    observer.observe(document.body, {
        childList: true,
        subtree: true
    });
})();