Skip to content

Instantly share code, notes, and snippets.

@sixem
Last active June 26, 2021 17:14
Show Gist options
  • Save sixem/c4966e153554ffff23f82a28b0fa704b to your computer and use it in GitHub Desktop.
Save sixem/c4966e153554ffff23f82a28b0fa704b to your computer and use it in GitHub Desktop.
Removes recommended channels from the sidebar (Twitch)
// ==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