asteriksme / No twitch pollution

// ==UserScript==
// @name         No twitch pollution
// @namespace    http://tampermonkey.net/
// @version      2024-08-22
// @description  Remove twitch home page carousel and stories
// @author       asteriksme
// @match        https://www.twitch.tv/*
// @icon         https://static.twitchcdn.net/assets/favicon-32-e29e246c157142c94346.png
// @grant        none
// @license      MIT
// @updateURL    https://openuserjs.org/meta/asteriksme/No_twitch_pollution.meta.js
// @downloadURL  https://openuserjs.org/install/asteriksme/No_twitch_pollution.user.js
// ==/UserScript==

/* jshint esversion: 8 */

(function() {
    'use strict';

    (new MutationObserver(check)).observe(document, {childList: true, subtree: true});

    function check(changes, observer) {
        if (document.querySelector('.followed-side-nav-header')) {
            observer.disconnect();
            document.querySelectorAll('.front-page-carousel, [class*=storiesLeftNavSection], .lcFJxY').forEach((x) => x.remove());
        }
    }
})();