diff options
author | Andrew Dolgov <[email protected]> | 2010-11-10 14:23:26 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2010-11-10 14:23:26 +0300 |
commit | c4f7ba80184042e593fdf064ff671f7c563f21e9 (patch) | |
tree | 415880ba62e5de07480b390023b54e1117eefe80 /tt-rss.js | |
parent | bd40aca6c035f0ded6802b3655b55a890bd95956 (diff) |
move runtime-info to JSON, simplify init-params format
Diffstat (limited to 'tt-rss.js')
-rw-r--r-- | tt-rss.js | 25 |
1 files changed, 7 insertions, 18 deletions
@@ -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; } } |