NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript==
// @name Dokkan Battle Fandom Wiki Garbage Remover
// @namespace http://tampermonkey.net/
// @namespace https://x.com/aizen_ceo
// @version 1.1
// @description Use this for removing unnecessary elements from the Dokkan Battle fandom Wiki
// @author Ignacio
// @match https://dbz-dokkanbattle.fandom.com/
// @match https://dbz-dokkanbattle.fandom.com/*
// @match https://dbz-dokkanbattle.fandom.com/wiki/*
// @icon https://cdn.discordapp.com/attachments/889902248245731382/1241698154022305862/unnamed.png?ex=664b2505&is=6649d385&hm=bc8ec3ce7f0a610bb464309c449ec5b35dec04318678a36db2c39fe2c35bc542&
// @grant none
// @license MIT
// @downloadURL https://update.greasyfork.org/scripts/495496/Dokkan%20Battle%20Fandom%20Wiki%20Garbage%20Remover.user.js
// @updateURL https://update.greasyfork.org/scripts/495496/Dokkan%20Battle%20Fandom%20Wiki%20Garbage%20Remover.meta.js
// ==/UserScript==
(function() {
'use strict';
// Lista de clases a ocultar
const classesToHide = [
'rail-module recent-images-module',
'main-page-tag-rcs',
'page-footer',
'license-description',
'mixed-content-footer',
'global-footer',
'page-header__meta'
];
// Lista de IDs a ocultar
const idsToHide = [
'mixed-content-footer',
];
// Lista de rutas XPath a ocultar
const xpathsToHide = [
'/html/body/div[4]/div[4]/div[2]/main/div[3]/div/div[1]/div[1]/div/div[8]',
'/html/body/div[4]/div[4]/div[2]/main/div[3]/div/div[1]/div[1]/div/div[9]'
// Añade aquí más rutas XPath si es necesario
];
// Ocultar los elementos con las clases especificadas
classesToHide.forEach(className => {
let elements = document.getElementsByClassName(className);
for (let element of elements) {
element.style.display = 'none';
}
});
// Ocultar los elementos con los IDs especificados
idsToHide.forEach(id => {
let element = document.getElementById(id);
if (element) {
element.style.display = 'none';
}
});
// Ocultar los elementos con las rutas XPath especificadas
xpathsToHide.forEach(xpath => {
let elements = document.evaluate(xpath, document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
for (let i = 0; i < elements.snapshotLength; i++) {
let element = elements.snapshotItem(i);
element.style.display = 'none';
}
});
})();