Greasy Fork

Greasy Fork is available in English.

Roblox Recommended and Sponsored remover

Enhance Roblox home page by removing Recommended and Sponsored sections.

当前为 2024-06-24 提交的版本,查看 最新版本

// ==UserScript==
// @name         Roblox Recommended and Sponsored remover
// @namespace    Roblox Recommended and Sponsored remover    
// @version      1.0
// @description  Enhance Roblox home page by removing Recommended and Sponsored sections.
// @author       Vexdel
// @match        https://*.roblox.com/home
// @grant        GM_addStyle
// ==/UserScript==

(function() {
    'use strict';

    // Function to add CSS styles to hide elements
    function addGlobalStyle(css) {
        const style = document.createElement('style');
        style.textContent = css;
        document.head.append(style);
    }

    // CSS rules to hide elements
    const cssToHide = `
        .container-header h2:contains("Recommended For You") {
            display: none !important;
        }
        .expand-home-content.wide-game-tile-game-grid.home-game-grid.game-grid {
            display: none !important;
        }
        #place-list > div > div > div:nth-child(5) > div,
        #place-list > div > div > div:nth-child(6) {
            display: none !important;
        }
        #place-list > div > div > div:nth-child(2) > div.container-header,
        #place-list > div > div > div:nth-child(7) > div.container-header,
        #place-list > div > div > div:nth-child(11) > div.container-header,
        #place-list > div > div > div:nth-child(10) > div.container-header {
            display: none !important;
        }
    `;

    // Apply the CSS styles to hide elements
    addGlobalStyle(cssToHide);
})();