diff options
author | Andrew Dolgov <[email protected]> | 2007-03-06 07:30:17 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2007-03-06 07:30:17 +0100 |
commit | ac7bcd7135719c135ef5fe589f5bb23c30835dc6 (patch) | |
tree | 23bc6ab16b17ad5236605edfb4b20a6228d77499 | |
parent | 07a2b3142e75e6a643db0993886dca356ba1cbb9 (diff) |
make CDM auto-catchup optional (closes #121)
-rw-r--r-- | functions.php | 3 | ||||
-rw-r--r-- | viewfeed.js | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/functions.php b/functions.php index 4c5059d14..ba92b2ee4 100644 --- a/functions.php +++ b/functions.php @@ -2109,6 +2109,9 @@ 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>"; } diff --git a/viewfeed.js b/viewfeed.js index 7678fbbaa..54ae82b0d 100644 --- a/viewfeed.js +++ b/viewfeed.js @@ -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) { |