Remove Homepage Garbage

Removes everything from the roblox homepage deemed useless (you'll basically just see your friends, continue section, and favourites)

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// ==UserScript==
// @name         Remove Homepage Garbage
// @namespace    https://www.roblox.com/home
// @version      2025.05.11
// @description  Removes everything from the roblox homepage deemed useless (you'll basically just see your friends, continue section, and favourites)
// @author       CMTG (@callmetreeguy on discord)
// @match        https://www.roblox.com/home
// @icon         https://www.google.com/s2/favicons?sz=64&domain=roblox.com
// @grant        none
// @license MIT
// ==/UserScript==


const DontDelete = {
    "Continue": true,
    "Favorites": true
}

function removeRecommendedSection() {
    const allGameGrids = document.querySelectorAll('div[data-testid="home-page-game-grid"]');
    allGameGrids.forEach(GameGrid => GameGrid.remove())

    const allContainers = document.querySelectorAll('div.game-sort-carousel-wrapper');
    //aria-label
    allContainers.forEach(container => {

        const ContainerText = container.querySelector("div.home-sort-header-container > div > *:first-child").getAttribute('aria-label')
        //ty roblox for inculding the aria-label <3
        if (!DontDelete[ContainerText]) {
            container.remove()
        }
    })

}
window.addEventListener('load', removeRecommendedSection);

const observer = new MutationObserver((mutations) => {
    const ContinueAB1 = document.querySelector("h2.sort-header > a")
    const ContinueAB2 = document.querySelector('div[data-testid="section-header"] > a')

    // basically if you are in the old homepage and not in the A/B test roblox will delete the entire game page accidentially

    if ((ContinueAB1 && ContinueAB1.innerText == "Continue") || ContinueAB2){
        setTimeout(removeRecommendedSection, 0)
    }
});

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