Skip to content

Commit ffb5b0e

Browse files
committed
Condensed ensure ChatGPT Projects scroll ↞ [auto-sync from https://github.com/adamlui/ai-web-extensions/tree/main/chatgpt-widescreen]
1 parent 043d002 commit ffb5b0e

File tree

1 file changed

+13
-17
lines changed

1 file changed

+13
-17
lines changed

chatgpt/chatgpt-widescreen/chatgpt-widescreen-mode.user.js

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@
235235
// @description:zu Thuthukisa iChatGPT ngemodi zesikrini ezibanzi/egcwele/ephezulu + imodi yokuvimbela i-spam. Futhi isebenza ku-poe.com!
236236
// @author Adam Lui
237237
// @namespace https://github.com/adamlui
238-
// @version 2025.8.11
238+
// @version 2025.8.12
239239
// @license MIT
240240
// @icon https://assets.chatgptwidescreen.com/images/icons/widescreen-robot-emoji/icon48.png?v=844b16e
241241
// @icon64 https://assets.chatgptwidescreen.com/images/icons/widescreen-robot-emoji/icon64.png?v=844b16e
@@ -827,23 +827,19 @@
827827
notify(app.msgs.notif_chatStopped, 'bottom-right')) } catch (err) {}
828828
})
829829

830-
// === FIX: Keep Projects landing list scrollable (issue #192) ===
831-
function ensureProjectsScroll() {
832-
if (env.site !== 'chatgpt') return
833-
const el = document.querySelector(
834-
'div[role="presentation"] > header#page-header + div.flex.basis-auto.flex-col.grow'
835-
)
836-
if (el) {
837-
el.style.overflowY = 'auto' // allow vertical scrolling
838-
el.style.maxHeight = '100vh' // safety cap
839-
el.style.overscrollBehavior = 'contain' // smoother wheel/touch behaviour
830+
// Ensure CHATGPT PROJECTS scroll
831+
if (env.site == 'chatgpt') {
832+
ensureProjectsScroll()
833+
new MutationObserver(ensureProjectsScroll).observe(document.body, { childList: true, subtree: true })
834+
function ensureProjectsScroll() {
835+
const projectElem = document.querySelector(
836+
'div[role="presentation"] > header#page-header + div.flex.basis-auto.flex-col.grow')
837+
if (projectElem) {
838+
projectElem.style.overflowY = 'auto'
839+
projectElem.style.maxHeight = '100vh' // safety cap
840+
projectElem.style.overscrollBehavior = 'contain' // smoother wheel/touch behaviour
841+
}
840842
}
841843
}
842-
ensureProjectsScroll()
843-
new MutationObserver(ensureProjectsScroll).observe(document.body, {
844-
childList: true,
845-
subtree: true
846-
})
847-
// === END FIX ===
848844

849845
})()

0 commit comments

Comments
 (0)