Greasy Fork is available in English.
Enhance Roblox home page by removing Recommended, Sponsored and Innovation Awards sections.
当前为
// ==UserScript==
// @name Roblox Recommended and Sponsored remover
// @namespace Roblox Recommended and Sponsored remover
// @version 1.2
// @description Enhance Roblox home page by removing Recommended, Sponsored and Innovation Awards sections.
// @author Vexdel
// @match https://*.roblox.com/home
// @grant GM_addStyle
// ==/UserScript==
(function() {
'use strict';
function removeSections() {
const sectionTitles = ["Sponsored", "Recommended For You", "Roblox Innovation Awards"];
sectionTitles.forEach(title => {
Array.from(document.querySelectorAll('h2')).forEach(heading => {
if (heading.textContent.includes(title)) {
const container = heading.closest('div');
if (container) container.style.display = 'none';
}
});
});
const filters = [
'.expand-home-content.wide-game-tile-game-grid.home-game-grid.game-grid',
'.expand-home-content.wide-game-tile-carousel.game-carousel',
'div.expand-home-content.game-carousel:nth-of-type(8)',
'div.expand-home-content.game-carousel:nth-of-type(6)',
'.text-default.font-sort-subtitle'
];
filters.forEach(selector => {
document.querySelectorAll(selector).forEach(element => {
element.style.display = 'none';
});
});
}
const observer = new MutationObserver(removeSections);
observer.observe(document.body, {
childList: true,
subtree: true,
});
removeSections();
})();