Removes bloat elements from Fandom wikis.
当前为
// ==UserScript==
// @name Fandom Bloat Remover
// @version 1.1
// @author samerop
// @description Removes bloat elements from Fandom wikis.
// @match http*://*.fandom.com/*
// @grant none
// @namespace https://greasyfork.org/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 });
})();