Last active
July 1, 2021 12:04
-
-
Save takaradariku/fd165c6cf2de5a8f174dbf1b87c5b546 to your computer and use it in GitHub Desktop.
unfuckdiscord - removes stickers, gift nitro button & more
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function clearBloat() { | |
try { | |
let giftButton = document.querySelector('[aria-label="Send a gift"]'); | |
let stickerButton = document.getElementsByClassName("buttonContainer-28fw2U").item(1); | |
let stickerTab = document.getElementById("sticker-picker-tab"); | |
giftButton.style.display = "none"; | |
stickerButton.style.display = "none"; | |
stickerTab.style.display = "none"; | |
} catch (err) {}; | |
let stickers = document.getElementsByClassName("clickableSticker-3HmpgV"); | |
for (var i = 0; i < stickers.length; i++) { | |
console.log("[Sticker Remover] Sticker removed"); | |
let rootNode = stickers.item(i).parentElement.parentElement; | |
if (rootNode.classList.contains("groupStart-23k01U")) { | |
if (!rootNode.nextSibling.classList.contains("groupStart-23k01U") && rootNode.nextSibling.classList.contains("message-2qnXI6")) { | |
stickers.item(i).remove(); | |
continue; | |
} | |
} | |
rootNode.remove(); | |
} | |
}; | |
const unFuckDiscord = new MutationObserver(clearBloat); | |
unFuckDiscord.observe(document.documentElement, { | |
childList: true, | |
attributes: true, | |
subtree: true | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment