This commit is contained in:
pianissi 2025-06-14 02:21:35 +02:00 committed by GitHub
commit 5c79a93c36
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1989,7 +1989,7 @@ const COMPOSE_TWEET_MODAL_PAGES = new Set([
ModalPaths.GIF_SEARCH,
])
// <body> 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, .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
@ -4158,6 +4158,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;
@ -4177,6 +4181,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