- //console.log("auto_catchup_batch: " + catchup_id_batch.toString());
- }
-
- });
-
- if (_infscroll_disable) {
- var child = $$("#headlines-frame div[id*=RROW]").last();
-
- if (child && $("headlines-frame").scrollTop >
- (child.offsetTop + child.offsetHeight - 50)) {
-
- console.log("we seem to be at an end");
-
- if (getInitParam("on_catchup_show_next_feed") == "1") {
- openNextUnreadFeed();
- }
- }
- }
- }
-
- } catch (e) {
- console.warn("headlines_scroll_handler: " + e);
- }
-}
-
-function openNextUnreadFeed() {
- try {
- var is_cat = activeFeedIsCat();
- var nuf = getNextUnreadFeed(getActiveFeedId(), is_cat);
- if (nuf) viewfeed({feed: nuf, is_cat: is_cat});
- } catch (e) {
- exception_error("openNextUnreadFeed", e);
- }
-}
-
-function catchupBatchedArticles() {
- try {
- if (catchup_id_batch.length > 0 && !_infscroll_request_sent && !_catchup_request_sent) {
-
- console.log("catchupBatchedArticles: working");
-
- // make a copy of the array
- var batch = catchup_id_batch.slice();
- var query = "?op=rpc&method=catchupSelected" +
- "&cmode=0&ids=" + param_escape(batch.toString());
-
- console.log(query);
-
- _catchup_request_sent = true;
-
- new Ajax.Request("backend.php", {
- parameters: query,
- onComplete: function(transport) {
- handle_rpc_json(transport);
-
- _catchup_request_sent = false;