Lolz.live - Remove uniqUsernameIcon

Удаляет все элементы с классом uniqUsernameIcon

// ==UserScript==
// @name         Lolz.live - Remove uniqUsernameIcon
// @namespace    http://tampermonkey.net/
// @version      1.3
// @description  Удаляет все элементы с классом uniqUsernameIcon
// @author       eretly
// @match        https://lolz.live/*
// @match        https://lzt.market/*
// @grant        none
// @license      MIT
// @run-at       document-start
// ==/UserScript==

(function() {
    'use strict';

    const deleteIcons = () => {
        document.querySelectorAll('.uniqUsernameIcon, .uniqUsernameIcon--custom').forEach(el => {
            el.remove();
        });
        
        document.querySelectorAll('span, div').forEach(el => {
            if (el.childElementCount === 1 && 
                (el.firstElementChild.classList.contains('uniqUsernameIcon') || 
                 el.firstElementChild.classList.contains('uniqUsernameIcon--custom'))) {
                el.remove();
            }
        });
    };

    deleteIcons();
    
    const interval = setInterval(deleteIcons, 100);

    const observer = new MutationObserver((mutations) => {
        deleteIcons();
    });

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

    window.addEventListener('load', () => {
        clearInterval(interval);
        deleteIcons();
    });
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址