Last active
June 26, 2021 17:14
-
-
Save sixem/c4966e153554ffff23f82a28b0fa704b to your computer and use it in GitHub Desktop.
Removes recommended channels from the sidebar (Twitch)
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
// ==UserScript== | |
// @name Removes Recommended Channels | |
// @namespace Violentmonkey Scripts | |
// @match https://www.twitch.tv/* | |
// @grant none | |
// @version 1.0 | |
// @author - | |
// @description 26/6/2021, 1:22:39 AM | |
// ==/UserScript== | |
var remove = () => | |
{ | |
var elements = document.querySelectorAll('div.side-nav-section:not([aria-label*="Followed Channels"])'); | |
if(elements.length > 0) | |
{ | |
elements.forEach((elem) => | |
{ | |
console.log(elem); | |
elem.remove(); | |
}); | |
} | |
return elements.length > 0; | |
}; | |
window.addEventListener('load', () => | |
{ | |
var looper = setInterval(() => | |
{ | |
if(remove()) clearInterval(looper); | |
}, 250); | |
console.log('Loaded'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment