]> git.wh0rd.org - tt-rss.git/blobdiff - tt-rss.js
quick unsubscribe prompt shows feed name
[tt-rss.git] / tt-rss.js
index 7157d3292ef8f03ca625816d53e4922b49f12adf..9e6d70c73bc629762883b4868aada98e20007e39 100644 (file)
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -75,6 +75,10 @@ function refetch_callback() {
        
                        parse_counters(counters, true);
 
+                       var runtime_info = counters.nextSibling;
+
+                       parse_runtime_info(runtime_info);
+
                        debug("refetch_callback: done");
 
                        if (!daemon_enabled) {
@@ -432,8 +436,10 @@ function quickMenuGo(opid) {
                                alert("Please select some feed first.");
                                return;
                        }
+
+                       var fn = getFeedName(actid);
        
-                       if (confirm("Unsubscribe from current feed?")) {
+                       if (confirm("Unsubscribe from " + fn + "?")) {
                                qfdDelete(actid);
                        }
                
@@ -513,4 +519,22 @@ function toggleDispRead() {
        }
 }
 
+function parse_runtime_info(elem) {
+       var param = elem.firstChild;
 
+       while (param) {
+               var k = param.getAttribute("key");
+               var v = param.getAttribute("value");
+
+               var w = document.getElementById("noDaemonWarning");
+               
+               if (w) {
+                       if (k == "daemon_is_running" && v != 1) {
+                               w.style.display = "block";
+                       } else {
+                               w.style.display = "none";
+                       }
+               }
+               param = param.nextSibling;
+       }
+}