headlines scroll handler: make preloading less aggressive

master
Andrew Dolgov 9 years ago
parent a461761728
commit d46af5a5cf

@ -1279,26 +1279,15 @@ function headlines_scroll_handler(e) {
} }
if (!_infscroll_disable) { if (!_infscroll_disable) {
if ((hsp && e.scrollTop + e.offsetHeight >= hsp.offsetTop - hsp.offsetHeight) || if (hsp && hsp.offsetTop <= e.scrollTop + e.offsetHeight) {
(e.scrollHeight != 0 &&
((e.scrollTop + e.offsetHeight) / e.scrollHeight >= 0.7))) {
if (hsp) hsp.innerHTML = "<span class='loading'><img src='images/indicator_tiny.gif'> " +
hsp.innerHTML = "<span class='loading'><img src='images/indicator_tiny.gif'> " + __("Loading, please wait...") + "</span>";
__("Loading, please wait...") + "</span>";
loadMoreHeadlines(); loadMoreHeadlines();
return; 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()) { if (isCdmMode()) {

Loading…
Cancel
Save