}
}
}
+
+// originally stolen from http://www.11tmr.com/11tmr.nsf/d6plinks/MWHE-695L9Z
+// bugfixed just a little bit :-)
+function getURLParam(strParamName){
+ var strReturn = "";
+ var strHref = window.location.href;
+
+ if (strHref.indexOf("#") == strHref.length-1) {
+ strHref = strHref.substring(0, strHref.length-1);
+ }
+
+ if ( strHref.indexOf("?") > -1 ){
+ var strQueryString = strHref.substr(strHref.indexOf("?"));
+ var aQueryString = strQueryString.split("&");
+ for ( var iParam = 0; iParam < aQueryString.length; iParam++ ){
+ if (aQueryString[iParam].indexOf(strParamName + "=") > -1 ){
+ var aParam = aQueryString[iParam].split("=");
+ strReturn = aParam[1];
+ break;
+ }
+ }
+ }
+ return strReturn;
+}
+
+
parse_counters(reply, f_document, window);
+ debug("refetch_callback: done");
+
if (!daemon_enabled) {
notify("All feeds updated.");
updateTitle("");
return fatalError(error_code);
}
+ debug("sanity check ok");
+
init_second_stage();
} catch (e) {
query_str = query_str + "&omode=" + omode;
query_str = query_str + "&uctr=" + global_unread;
+ debug("in scheduleFeedUpdate");
if (xmlhttp_ready(xmlhttp)) {
xmlhttp.open("GET", query_str, true);
if (!genericSanityCheck())
return;
+ if (getURLParam('debug')) {
+ document.getElementById('debug_output').style.display = 'block';
+ debug('debug mode activated');
+ }
+
xmlhttp.open("GET", "backend.php?op=rpc&subop=sanityCheck", true);
xmlhttp.onreadystatechange=backend_sanity_check_callback;
xmlhttp.send(null);
c.style.height = c.scrollHeight - nh + "px"; */
}
+
+ debug("second stage ok");
} catch (e) {
exception_error("init_second_stage", e);
}
}
+function debug(msg) {
+ var c = document.getElementById('debug_output');
+ if (c && c.style.display == "block") {
+ while (c.firstChild != 'undefined' && c.childNodes.length > 15) {
+ c.removeChild(c.firstChild);
+ }
+
+ var d = new Date();
+ var ts = d.getHours() + ":" + d.getMinutes() + ":" + d.getSeconds();
+ c.innerHTML = c.innerHTML + "<li>[" + ts + "] " + msg + "</li>";
+ }
+}