1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-15 02:46:02 +00:00

move runtime-info to JSON, simplify init-params format

This commit is contained in:
Andrew Dolgov
2010-11-10 14:23:26 +03:00
parent bd40aca6c0
commit c4f7ba8018
3 changed files with 46 additions and 78 deletions

View File

@@ -579,18 +579,17 @@ function toggleDispRead() {
}
function parse_runtime_info(elem) {
if (!elem) {
console.log("parse_runtime_info: elem is null, aborting");
if (!elem || !elem.firstChild) {
return;
}
var param = elem.firstChild;
var data = JSON.parse(elem.firstChild.nodeValue);
console.log("parse_runtime_info: " + param);
console.log("parsing runtime info...");
while (param) {
var k = param.getAttribute("key");
var v = param.getAttribute("value");
for (k in data) {
var v = data[k];
console.log("RI: " + k + " => " + v);
@@ -623,18 +622,8 @@ function parse_runtime_info(elem) {
if (!error_flag) {
notify('');
}
}
/* var w = $("noDaemonWarning");
if (w) {
if (k == "daemon_is_running" && v != 1) {
w.style.display = "block";
} else {
w.style.display = "none";
}
} */
param = param.nextSibling;
}
}