Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Anime Srbija Debloater
- // @namespace http://tampermonkey.net/
- // @version 1.0
- // @description Removes bloat on AnimeSrbija.com
- // @author Dusan Milutinovic
- // @match https://*.animesrbija.com/*
- // @icon https://www.google.com/s2/favicons?domain=animesrbija.com
- // @grant none
- // ==/UserScript==
- (function() {
- 'use strict';
- // Remove all widgets except the player, the server chooser and the comments (do not remove comments at this stage)
- Array.from(document.querySelectorAll('.widget')).forEach(node => {
- const classes = Array.from(node.classList);
- if(!(classes.includes('player') || classes.includes('comment') || classes.includes('servers')))
- node.remove()
- });
- // Remove the comment section
- Array.from(document.querySelectorAll('.widget')).forEach(node => {
- const classes = Array.from(node.classList);
- if(classes.includes('comment')) {
- let subNodes = Array.from(node.childNodes);
- if(subNodes.length < 1)
- return;
- if(!subNodes[1])
- return;
- if(subNodes[1].innerText.toLowerCase().includes('komentari') && !subNodes[1].innerText.toLowerCase().includes('server'))
- node.remove();
- }
- });
- // Remove the Discord widget bot
- const __windgetbot__ = document.querySelector('widgetbot');
- if( __windgetbot__)
- __windgetbot__.remove();
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement