This commit is contained in:
2026-07-16 05:31:12 +02:00
parent 6f8a809637
commit 514d6597cf

View File

@@ -611,7 +611,12 @@
container.appendChild(ioSentinel); container.appendChild(ioSentinel);
} }
attachMediaLoadListeners(container); attachMediaLoadListeners(container);
checkOverflow(); // Defer overflow check until after the browser has performed layout on the
// newly-injected innerHTML — a synchronous call here fires before paint so
// scrollHeight === clientHeight, causing has-overflow to be stripped and the
// "read more" button to flash away. Double-rAF guarantees we measure after
// the first layout/paint cycle.
requestAnimationFrame(() => requestAnimationFrame(() => checkOverflow()));
fetchSidebarYoutubeTitles(container); fetchSidebarYoutubeTitles(container);
// Auto-play converted GIF videos and webm emoji stickers // Auto-play converted GIF videos and webm emoji stickers
container.querySelectorAll('video.autoplay-gif').forEach(v => { v.autoplay = true; v.muted = true; v.play().catch(() => { v.addEventListener('canplay', () => v.play().catch(() => { }), { once: true }); }); }); container.querySelectorAll('video.autoplay-gif').forEach(v => { v.autoplay = true; v.muted = true; v.play().catch(() => { v.addEventListener('canplay', () => v.play().catch(() => { }), { once: true }); }); });