From d46af5a5cf0a0b268372d6e09e7205e3b108069a Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 29 Jul 2015 16:57:24 +0300 Subject: [PATCH] headlines scroll handler: make preloading less aggressive --- js/viewfeed.js | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/js/viewfeed.js b/js/viewfeed.js index e1425a382..6e6e1c152 100644 --- a/js/viewfeed.js +++ b/js/viewfeed.js @@ -1279,26 +1279,15 @@ function headlines_scroll_handler(e) { } if (!_infscroll_disable) { - if ((hsp && e.scrollTop + e.offsetHeight >= hsp.offsetTop - hsp.offsetHeight) || - (e.scrollHeight != 0 && - ((e.scrollTop + e.offsetHeight) / e.scrollHeight >= 0.7))) { + if (hsp && hsp.offsetTop <= e.scrollTop + e.offsetHeight) { - if (hsp) - hsp.innerHTML = " " + - __("Loading, please wait...") + ""; + hsp.innerHTML = " " + + __("Loading, please wait...") + ""; loadMoreHeadlines(); return; } - /*} else { - if (hsp) { - if (_infscroll_disable) - hsp.innerHTML = "" + - __("Click to open next unread feed.") + ""; - else - hsp.innerHTML = ""; - }*/ } if (isCdmMode()) {