]> git.wh0rd.org Git - tt-rss.git/commitdiff
make CDM auto-catchup optional (closes #121)
authorAndrew Dolgov <fox@madoka.spb.ru>
Tue, 6 Mar 2007 06:30:17 +0000 (07:30 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Tue, 6 Mar 2007 06:30:17 +0000 (07:30 +0100)
functions.php
viewfeed.js

index 4c5059d14af38c8e01d558bf0ee1b44ae940228a..ba92b2ee4bb61431b16ffc027b3281aa6c2fc739 100644 (file)
                print "<param key=\"confirm_feed_catchup\" value=\"" . 
                        sprintf("%d", get_pref($link, "CONFIRM_FEED_CATCHUP")) . "\"/>";
 
+               print "<param key=\"cdm_auto_catchup\" value=\"" . 
+                       sprintf("%d", get_pref($link, "CDM_AUTO_CATCHUP")) . "\"/>";
+
                print "</init-params>";
        }
 
index 7678fbbaad5b75020984b83f2270c40881d69bc5..54ae82b0ddfba75a01cbd7dff73064dae1b67aac 100644 (file)
@@ -46,10 +46,13 @@ function headlines_callback() {
 
                if (_cdm_wd_timeout) window.clearTimeout(_cdm_wd_timeout);
 
-               if (!document.getElementById("headlinesList")) {
+               if (!document.getElementById("headlinesList") && 
+                               getInitParam("cdm_auto_catchup") == 1) {
                        debug("starting CDM watchdog");
                        _cdm_wd_timeout = window.setTimeout("cdmWatchdog()", 5000);
                        _cdm_wd_vishist = new Array();
+               } else {
+                       debug("not in CDM mode or watchdog disabled");
                }
 
                if (_tag_cdm_scroll) {