summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2018-11-30 14:25:12 +0300
committerAndrew Dolgov <[email protected]>2018-11-30 14:25:12 +0300
commit58dee80ae5c3eaf9e48d8ab04e043fdb03eb4554 (patch)
treee0eb96c433a317da7bea70c5d151ef2196cd003b /js
parent0c06bb5fe1278b7d92926b21b000e9c966e19ee6 (diff)
unpackVisibleHeadlines: go ahead of the buffer position a bit
Diffstat (limited to 'js')
-rwxr-xr-xjs/viewfeed.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/js/viewfeed.js b/js/viewfeed.js
index 6ae9cdd8a..e1d9cefdf 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");