Reset static content 42s timer on scroll — user is still reading
This commit is contained in:
parent
9841013306
commit
309c291a92
1 changed files with 7 additions and 0 deletions
|
|
@ -543,7 +543,14 @@
|
|||
setupMediaEvents();
|
||||
} else {
|
||||
// Static content (PDF, image, etc.) — start 42-second timer
|
||||
// Reset on scroll — scrolling means the user is still reading
|
||||
startStaticTimer();
|
||||
window.addEventListener('scroll', function() {
|
||||
if (!activeMedia && autoplayEnabled) {
|
||||
cancelCountdown();
|
||||
startStaticTimer();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// --- Event delegation for SPA link interception ---
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue