summaryrefslogtreecommitdiff
path: root/tt-rss.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2005-12-13 16:59:43 +0100
committerAndrew Dolgov <[email protected]>2005-12-13 16:59:43 +0100
commit1a6a9555ffc0bb6d6f1d9e1b54e141ebd605c604 (patch)
tree939fb4f4ef2077841cf8ced4476781a2dd2b2a10 /tt-rss.js
parentc3d74dca93ce93bd7aecefccfb459166da9d459e (diff)
consolidate counter parsing code
Diffstat (limited to 'tt-rss.js')
-rw-r--r--tt-rss.js31
1 files changed, 2 insertions, 29 deletions
diff --git a/tt-rss.js b/tt-rss.js
index c4cd2db74..dee5e8546 100644
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -92,35 +92,8 @@ function refetch_callback() {
}
var f_document = window.frames["feeds-frame"].document;
-
- for (var l = 0; l < reply.childNodes.length; l++) {
- var id = reply.childNodes[l].getAttribute("id");
- var ctr = reply.childNodes[l].getAttribute("counter");
-
- var feedctr = f_document.getElementById("FEEDCTR-" + id);
- var feedu = f_document.getElementById("FEEDU-" + id);
- var feedr = f_document.getElementById("FEEDR-" + id);
-
- if (id == "global-unread") {
- global_unread = ctr;
- continue;
- }
-
- if (feedctr && feedu && feedr) {
-
- feedu.innerHTML = ctr;
-
- if (ctr > 0) {
- feedctr.className = "odd";
- if (!feedr.className.match("Unread")) {
- feedr.className = feedr.className + "Unread";
- }
- } else {
- feedctr.className = "invisible";
- feedr.className = feedr.className.replace("Unread", "");
- }
- }
- }
+
+ parse_counters(reply, f_document);
updateTitle("");
notify("All feeds updated.");