From 58dee80ae5c3eaf9e48d8ab04e043fdb03eb4554 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 30 Nov 2018 14:25:12 +0300 Subject: [PATCH] unpackVisibleHeadlines: go ahead of the buffer position a bit --- js/viewfeed.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/viewfeed.js b/js/viewfeed.js index 6ae9cdd8..e1d9cefd 100755 --- a/js/viewfeed.js +++ b/js/viewfeed.js @@ -1008,11 +1008,12 @@ function unpackVisibleHeadlines() { if (!isCdmMode()) return; const rows = $$("#headlines-frame div[id*=RROW][data-content]"); + const threshold = $("headlines-frame").scrollTop + $("headlines-frame").offsetHeight + 100; for (let i = 0; i < rows.length; i++) { const row = rows[i]; - if (row.offsetTop <= $("headlines-frame").scrollTop + $("headlines-frame").offsetHeight) { + if (row.offsetTop <= threshold) { console.log("unpacking: " + row.id); const content = row.getAttribute("data-content"); -- 2.39.2