From 8692f3f582b48e0d69db916b057135bbf57c61cd Mon Sep 17 00:00:00 2001 From: unknown <132866503+pianissi@users.noreply.github.com> Date: Wed, 2 Oct 2024 21:49:51 +1000 Subject: [PATCH 1/2] feat: Add full-width content to profiles --- script.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/script.js b/script.js index 70cf50d..65938e7 100644 --- a/script.js +++ b/script.js @@ -1695,7 +1695,7 @@ const THEME_COLORS = new Map([ ['green500', 'rgb(0, 186, 124)'], ]) // pseudo-selector for pages the full-width content feature works on -const FULL_WIDTH_BODY_PSEUDO = ':is(.Community, .List, .HomeTimeline)' +const FULL_WIDTH_BODY_PSEUDO = ':is(.Community, .List, .HomeTimeline, .Profile)' // Matches any notification count at the start of the title const TITLE_NOTIFICATION_RE = /^\(\d+\+?\) / // The Communities nav item takes you to /yourusername/communities @@ -3372,6 +3372,10 @@ const configureCss = (() => { body.Sidebar${FULL_WIDTH_BODY_PSEUDO} ${Selectors.PRIMARY_COLUMN} > div:first-child > div:last-child { max-width: 990px; } + /* Force full width on Profiles when sidebar is visible */ + body.Sidebar.Profile ${Selectors.PRIMARY_COLUMN} > div:first-child > div:last-child > div:first-child > div:first-child { + max-width: unset; + } /* Make the "What's happening" input keep its original width */ body.HomeTimeline ${Selectors.PRIMARY_COLUMN} > div:first-child > div:nth-of-type(3) div[role="progressbar"] + div { max-width: 598px; @@ -3391,6 +3395,10 @@ const configureCss = (() => { body:not(.Sidebar)${FULL_WIDTH_BODY_PSEUDO} ${Selectors.PRIMARY_COLUMN} > div:first-child > div:last-child { max-width: unset; } + /* Force full width on Profiles when sidebar is not visible */ + body.not(.Sidebar).Profile ${Selectors.PRIMARY_COLUMN} > div:first-child > div:last-child > div:first-child > div:first-child { + max-width: unset; + } `) if (!config.fullWidthMedia) { // Make media & cards keep their original width From 4be36de9f8966e127a88e06631cb70d1dc6ed634 Mon Sep 17 00:00:00 2001 From: unknown <132866503+pianissi@users.noreply.github.com> Date: Wed, 2 Oct 2024 21:59:34 +1000 Subject: [PATCH 2/2] feat: Enable full-width on posts --- script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script.js b/script.js index 65938e7..8589719 100644 --- a/script.js +++ b/script.js @@ -1695,7 +1695,7 @@ const THEME_COLORS = new Map([ ['green500', 'rgb(0, 186, 124)'], ]) // pseudo-selector for pages the full-width content feature works on -const FULL_WIDTH_BODY_PSEUDO = ':is(.Community, .List, .HomeTimeline, .Profile)' +const FULL_WIDTH_BODY_PSEUDO = ':is(.Community, .List, .HomeTimeline, .Profile, .Tweet)' // Matches any notification count at the start of the title const TITLE_NOTIFICATION_RE = /^\(\d+\+?\) / // The Communities nav item takes you to /yourusername/communities