summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2015-07-29 16:57:24 +0300
committerAndrew Dolgov <[email protected]>2015-07-29 16:57:24 +0300
commitd46af5a5cf0a0b268372d6e09e7205e3b108069a (patch)
tree4ff9fad306fd8678b28a9fb45e006371033260fc /js
parenta46176172878938d936aaeb75c536d2e4d4016cf (diff)
headlines scroll handler: make preloading less aggressive
Diffstat (limited to 'js')
-rw-r--r--js/viewfeed.js17
1 files 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 = "<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()) {