Disable social features also hide the "Start a party" button in the Guide menu

This commit is contained in:
redphx 2024-06-02 09:52:41 +07:00
parent d79aaecb54
commit e98fa29271

View File

@ -6,11 +6,14 @@ import { renderStylus } from "@macros/build" with {type: "macro"};
export function addCss() { export function addCss() {
let css = renderStylus(); let css = renderStylus();
// Hide "Play with friends" section
if (getPref(PrefKey.BLOCK_SOCIAL_FEATURES)) { if (getPref(PrefKey.BLOCK_SOCIAL_FEATURES)) {
css += ` css += `
/* Hide "Play with friends" section */
div[class^=HomePage-module__bottomSpacing]:has(button[class*=SocialEmptyCard]), div[class^=HomePage-module__bottomSpacing]:has(button[class*=SocialEmptyCard]),
button[class*=SocialEmptyCard] { button[class*=SocialEmptyCard],
/* Hide "Start a party" button in the Guide menu */
#gamepass-dialog-root div[class^=AchievementsPreview-module__container] + button[class*=HomeLandingPage-module__button],
{
display: none; display: none;
} }
`; `;
@ -54,12 +57,13 @@ div[class*=StreamHUD-module__buttonsContainer] {
`; `;
} }
// Simplify Stream's menu
css += ` css += `
div[class*=StreamMenu-module__menu] { div[class*=StreamMenu-module__menu] {
min-width: 100vw !important; min-width: 100vw !important;
} }
`; `;
// Simplify Stream's menu
if (getPref(PrefKey.STREAM_SIMPLIFY_MENU)) { if (getPref(PrefKey.STREAM_SIMPLIFY_MENU)) {
css += ` css += `
div[class*=Menu-module__scrollable] { div[class*=Menu-module__scrollable] {