aboutsummaryrefslogtreecommitdiff
path: root/p/scripts
diff options
context:
space:
mode:
authorGravatar maTh <math-home@web.de> 2022-07-31 13:26:03 +0200
committerGravatar GitHub <noreply@github.com> 2022-07-31 13:26:03 +0200
commitc5ff838730fc28be660c4ea108d11fe55eff9787 (patch)
treed7b13a77a4a97b574bfb2e925cd0f63d52074801 /p/scripts
parent11d1f653d2c39ce1db83de87dcd1b48eeea8f06e (diff)
Update main.js (#4471)
Diffstat (limited to 'p/scripts')
-rw-r--r--p/scripts/main.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/p/scripts/main.js b/p/scripts/main.js
index 17c292b9f..37984513d 100644
--- a/p/scripts/main.js
+++ b/p/scripts/main.js
@@ -704,7 +704,8 @@ function onScroll() {
return;
}
if (context.auto_mark_scroll) {
- const minTop = 40 + box_to_follow.scrollTop;
+ const hidden_px = -5; // negative = pixels over the edge
+ const minTop = hidden_px + box_to_follow.scrollTop;
document.querySelectorAll('.not_read:not(.keep_unread)').forEach(function (div) {
if (div.offsetHeight > 0 &&
div.offsetParent.offsetTop + div.offsetTop + div.offsetHeight < minTop) {