diff options
| author | Adam Soltys <[email protected]> | 2026-10-18 07:52:54 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-10-18 07:52:54 -0700 |
| commit | 972f668f669976317ac4b92fadb49c7a085aac30 (patch) | |
| tree | 7f1602058a5697729ef8f89cf0d19f746e3f5144 /src | |
| parent | e578382511274893a7b53fd39820bf947c4008f1 (diff) | |
| download | coinosv3-972f668f669976317ac4b92fadb49c7a085aac30.tar.gz coinosv3-972f668f669976317ac4b92fadb49c7a085aac30.zip | |
A clip in the post a reply answers (the "Replying to" card) goes full screen: a tap on it or its full-screen button used to do nothing, the full-screen handler taking it back out for a media pager that doesn't have it.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013ZDf1cyCQLkfjftYhymZAg
Diffstat (limited to 'src')
| -rw-r--r-- | src/features/messages.js | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/features/messages.js b/src/features/messages.js index 0c69f23..079c22c 100644 --- a/src/features/messages.js +++ b/src/features/messages.js @@ -7986,7 +7986,9 @@ export function messagesFeature(ctx) { // The player's own full-screen button on a feed clip: the pager, not // Chrome's full screen (no next clip there). The button stays on the bar // (left off, Chrome greys it out) and is taken over here. - if (el && !pager && el.matches && el.matches('.notes-feed video.note-video') && el.dataset.clip) { + // (only a clip the pager has: taken out of full screen for a pager that + // then wouldn't open, a quoted post's clip went nowhere at all) + if (el && !pager && el.matches && el.matches('.notes-feed video.note-video') && el.dataset.clip && clipItem(el, el.dataset.clip)) { const url = el.dataset.clip; Promise.resolve((document.exitFullscreen || document.webkitExitFullscreen || (() => {})).call(document)).catch(() => {}) .then(() => { if (!pager && document.contains(el)) openClip(el, url); }); @@ -12425,12 +12427,22 @@ export function messagesFeature(ctx) { // (what the player's own full screen did). The screen isn't turned for a // wide clip — Adam would rather it play with bars and turn the phone // himself — so it follows the phone throughout. - function openClip(v, url) { + // The pager's item for a clip on the page, if the pager has it: a clip in + // the post a reply answers (its "Replying to" card) isn't one of the + // feed's own, and gets the browser's full screen instead. + function clipItem(v, url) { try { const on = pageRowOf(v); - if (!on) return false; + if (!on) return null; const it = feedMediaItems(on.c, 'videos').find((x) => (x.row.id === on.rowId || x.ev.id === on.rowId) && x.url === url); - if (!it) return false; + return it ? { on, it } : null; + } catch { return null; } + } + function openClip(v, url) { + try { + const found = clipItem(v, url); + if (!found) return false; + const { on, it } = found; tappedClips.add(url); // asked for by hand: no tap-to-play cover const at = v.currentTime || 0; v.pause(); |
