Roblox Recommended, Sponsored and Events remover

Enhance Roblox home page by removing Recommended, Sponsored and Innovation Awards sections and random roblox events.

// ==UserScript==
// @name         Roblox Recommended, Sponsored and Events remover
// @namespace    Roblox Recommended and Sponsored remover
// @version      2
// @description  Enhance Roblox home page by removing Recommended, Sponsored and Innovation Awards sections and random roblox events.
// @author       Vexdel
// @match        https://*.roblox.com/home
// @grant        GM_addStyle
// ==/UserScript==

(function() {
    'use strict';

    function removeSections() {
        const sectionsToRemove = [
            { title: "Get in The Games", selector: 'div.game-sort-carousel-wrapper' },
            { title: "Recommended For You", selector: 'div[data-testid="home-page-game-grid"]' },
            { title: "Sponsored", selector: 'div.game-sort-carousel-wrapper' }
        ];

        sectionsToRemove.forEach(section => {
            document.querySelectorAll('h2, h3').forEach(heading => {
                if (heading.textContent.includes(section.title)) {
                    const container = heading.closest(section.selector);
                    if (container) {
                        container.style.display = 'none';
                    }
                }
            });
        });
    }

    const observer = new MutationObserver(removeSections);

    observer.observe(document.body, {
        childList: true,
        subtree: true,
    });

    removeSections();
})();