summaryrefslogtreecommitdiff
path: root/tt-rss.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2010-11-10 14:23:26 +0300
committerAndrew Dolgov <[email protected]>2010-11-10 14:23:26 +0300
commitc4f7ba80184042e593fdf064ff671f7c563f21e9 (patch)
tree415880ba62e5de07480b390023b54e1117eefe80 /tt-rss.js
parentbd40aca6c035f0ded6802b3655b55a890bd95956 (diff)
move runtime-info to JSON, simplify init-params format
Diffstat (limited to 'tt-rss.js')
-rw-r--r--tt-rss.js25
1 files changed, 7 insertions, 18 deletions
diff --git a/tt-rss.js b/tt-rss.js
index 82199cc14..5551dc2d1 100644
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -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;
}
}