Fandom Bloat Remover

Removes bloat elements from Fandom wikis.

目前為 2025-03-05 提交的版本,檢視 最新版本

// ==UserScript==
// @name        Fandom Bloat Remover
// @version 1.0
// @description Removes bloat elements from Fandom wikis.
// @match       http*://*.fandom.com/*
// @namespace https://gf.qytechs.cn/users/1426714
// ==/UserScript==

(function() {
    'use strict';

    const s = [
        "#age-gate",
        "body > div.main-container > div.resizable-container > div.page.has-right-rail > aside",
        "#global-explore-navigation",
        "body > div.main-container > footer",
        "#global-top-navigation",
        "body > div.notifications-placeholder",
        "#WikiaBar",
        "body > div.main-container > div.resizable-container > div.page.has-right-rail > main > div.page-side-tools__wrapper",
        "#p-views",
        "body > div.main-container > div.resizable-container > div.community-header-wrapper > header > div > div.page-counter",
        "body > div.main-container > div.resizable-container > div.community-header-wrapper > header > div > div.wiki-tools.wds-button-group",
        "#mw-data-after-content",
        "body > div.main-container > div.resizable-container > div.page.has-right-rail > main > div.page-footer > div.license-description",
        "body > div.main-container > div.top-ads-container",
        "body > div.main-container > div.resizable-container > div.bottom-ads-container",
        "#top_boxad"
    ];

    function removeElements() {
        s.forEach(selector => {
            const r = document.querySelector(selector);
            if (r) {
                r.remove();
            }
        });
    }

    removeElements();

    const observer = new MutationObserver(removeElements);
    observer.observe(document.body, { childList: true, subtree: true });

})();

QingJ © 2025

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