From 4764c27ef8ca2f6c3e27b2a9686708e91bcccc32 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 29 Aug 2007 15:10:41 +0100 Subject: [PATCH] disable infinite scrolling when Limit == 0 (closes #143) --- feedlist.js | 2 +- viewfeed.js | 15 +++++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/feedlist.js b/feedlist.js index 3874ccea..904638ce 100644 --- a/feedlist.js +++ b/feedlist.js @@ -75,7 +75,7 @@ function viewfeed(feed, subop, is_cat, subop_param, skip_history, offset) { var toolbar_form = document.forms["main_toolbar_form"]; var toolbar_query = Form.serialize("main_toolbar_form"); - if (document.forms["main_toolbar_form"].query) { + if (toolbar_form.query) { toolbar_form.query.value = ""; } diff --git a/viewfeed.js b/viewfeed.js index 66b89920..7106d781 100644 --- a/viewfeed.js +++ b/viewfeed.js @@ -1248,10 +1248,17 @@ function headlines_scroll_handler() { var e = document.getElementById("headlinesInnerContainer"); - if (e.scrollTop + e.offsetHeight > e.scrollHeight - 50) { - if (!_infscroll_disable) { - debug("more cowbell!"); - viewNextFeedPage(); + // don't do infinite scrolling when Limit == All + + var toolbar_form = document.forms["main_toolbar_form"]; + + var limit = toolbar_form.limit[toolbar_form.limit.selectedIndex]; + if (limit.value != 0) { + if (e.scrollTop + e.offsetHeight > e.scrollHeight - 50) { + if (!_infscroll_disable) { + debug("more cowbell!"); + viewNextFeedPage(); + } } } -- 2.39.5