Update main.js (#4471)

pull/4465/head
maTh 2 years ago committed by GitHub
parent 11d1f653d2
commit c5ff838730
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      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) {

Loading…
Cancel
Save