您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
Roblox Home Page Cleaner with the option to toggle on or off "Today's Picks", previously known as Roblox Recommended, Sponsored and Events remover
当前为
// ==UserScript== // @name Roblox Home Cleaner // @namespace Roblox Recommended and Sponsored remover // @version 6.1.1 // @description Roblox Home Page Cleaner with the option to toggle on or off "Today's Picks", previously known as Roblox Recommended, Sponsored and Events remover // @author Vexdll // @match https://*.roblox.com/home // @grant GM_addStyle // ==/UserScript== (function () { 'use strict'; const ALLOWED_SECTIONS = ["Continue", "Favorites"]; let showTodaysPicks = false; function addNavBarButton() { const navBar = document.querySelector('.navbar, .rbx-navbar'); if (!navBar) return; const navBarItems = navBar.querySelector('.navbar-right') || navBar; const toggleButton = document.createElement('a'); toggleButton.textContent = 'Toggle Today\'s Picks'; Object.assign(toggleButton.style, { userSelect: 'none', padding: '6px 9px', display: 'inline-block', color: '#fff', fontSize: '14px', textDecoration: 'none', cursor: 'pointer', textAlign: 'center', position: 'relative', }); GM_addStyle(` a::after { content: ''; position: absolute; bottom: 0; left: 50%; right: 50%; height: 2px; background-color: transparent; transition: all 0.3s ease; } a:hover::after { left: 0; right: 0; background-color: #fff; } `); toggleButton.addEventListener('click', () => { showTodaysPicks = !showTodaysPicks; cleanHomePage(); }); navBarItems.appendChild(toggleButton); } function cleanHomePage() { document.querySelectorAll('h2, h3').forEach(heading => { const sectionTitle = heading.textContent.trim(); const container = heading.closest( 'div[class*="game-sort-carousel-wrapper"], div[data-testid="home-page-game-grid"]' ); if (container) { container.style.display = ALLOWED_SECTIONS.includes(sectionTitle) || (showTodaysPicks && sectionTitle.startsWith("Today's Picks")) ? '' : 'none'; } }); } const observer = new MutationObserver(cleanHomePage); observer.observe(document.body, { childList: true, subtree: true }); addNavBarButton(); cleanHomePage(); })();