]> git.wh0rd.org Git - tt-rss.git/commitdiff
headlines scroll handler: make preloading less aggressive
authorAndrew Dolgov <noreply@madoka.volgo-balt.ru>
Wed, 29 Jul 2015 13:57:24 +0000 (16:57 +0300)
committerAndrew Dolgov <noreply@madoka.volgo-balt.ru>
Wed, 29 Jul 2015 13:57:24 +0000 (16:57 +0300)
js/viewfeed.js

index e1425a3820fd056e0e8f834d78ace9a74015617d..6e6e1c1523d846a8f3d565b258ea7292d3979a1a 100644 (file)
@@ -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 = "<span class='loading'><img src='images/indicator_tiny.gif'> " +
-                                               __("Loading, please wait...") + "</span>";
+                               hsp.innerHTML = "<span class='loading'><img src='images/indicator_tiny.gif'> " +
+                                       __("Loading, please wait...") + "</span>";
 
                                loadMoreHeadlines();
                                return;
 
                        }
-               /*} else {
-                       if (hsp) {
-                               if (_infscroll_disable)
-                                       hsp.innerHTML = "<a href='#' onclick='openNextUnreadFeed()'>" +
-                                               __("Click to open next unread feed.") + "</a>";
-                               else
-                                       hsp.innerHTML = "";
-                       }*/
                }
 
                if (isCdmMode()) {