]> git.wh0rd.org - tt-rss.git/blobdiff - functions.js
quick unsubscribe prompt shows feed name
[tt-rss.git] / functions.js
index 35579364047fa149fc88c2f1c2d530bf49a32fa1..f7e29888847cf84292fce92404c86b78b8fe2156 100644 (file)
@@ -470,6 +470,11 @@ function parse_counters(reply, scheduled_call) {
                var f_document = getFeedsContext().document;
                var title_obj = getMainContext();
 
+               if (reply.firstChild && reply.firstChild.firstChild) {
+                       debug("<b>wrong element passed to parse_counters, adjusting.</b>");
+                       reply = reply.firstChild;
+               }
+
                debug("F_DOC: " + f_document + ", T_OBJ: " + title_obj);
 
                for (var l = 0; l < reply.childNodes.length; l++) {
@@ -565,7 +570,9 @@ function all_counters_callback() {
 
                        var reply = xmlhttp_rpc.responseXML.firstChild;
 
-                       parse_counters(reply);
+                       var counters = reply.firstChild;
+
+                       parse_counters(counters);
        
                } catch (e) {
                        exception_error("all_counters_callback", e);
@@ -1174,4 +1181,12 @@ function fatalError(code, message) {
        }
 }
 
-
+function getFeedName(id) {
+       var d = getFeedsContext().document;
+       var e = d.getElementById("FEEDN-" + id);
+       if (e) {
+               return e.innerHTML.stripTags();
+       } else {
+               return null;
+       }
+}