diff options
author | Andrew Dolgov <[email protected]> | 2018-11-30 14:25:12 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2018-11-30 14:25:12 +0300 |
commit | 58dee80ae5c3eaf9e48d8ab04e043fdb03eb4554 (patch) | |
tree | e0eb96c433a317da7bea70c5d151ef2196cd003b /js/viewfeed.js | |
parent | 0c06bb5fe1278b7d92926b21b000e9c966e19ee6 (diff) |
unpackVisibleHeadlines: go ahead of the buffer position a bit
Diffstat (limited to 'js/viewfeed.js')
-rwxr-xr-x | js/viewfeed.js | 3 |
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"); |