summaryrefslogtreecommitdiff
path: root/functions.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2005-12-13 10:27:41 +0100
committerAndrew Dolgov <[email protected]>2005-12-13 10:27:41 +0100
commit280ee9a3398c8fecd975f22147eb5f8c10552b77 (patch)
treef39a5c2e98bfb7353b24a880f238fed9a5197ddf /functions.js
parentfe14aeb84c58141ca1fb4acde3fd6082c95a80c9 (diff)
display number of unread articles in category
Diffstat (limited to 'functions.js')
-rw-r--r--functions.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/functions.js b/functions.js
index b72c1157b..a77854827 100644
--- a/functions.js
+++ b/functions.js
@@ -358,6 +358,7 @@ function all_counters_callback() {
for (var l = 0; l < reply.childNodes.length; l++) {
var id = reply.childNodes[l].getAttribute("id");
+ var t = reply.childNodes[l].getAttribute("type");
var ctr = reply.childNodes[l].getAttribute("counter");
if (id == "global-unread") {
@@ -365,6 +366,12 @@ function all_counters_callback() {
parent.updateTitle();
continue;
}
+
+ if (t == "category") {
+ var catctr = f_document.getElementById("FCATCTR-" + id);
+ catctr.innerHTML = "(" + ctr + " unread)";
+ continue;
+ }
var feedctr = f_document.getElementById("FEEDCTR-" + id);
var feedu = f_document.getElementById("FEEDU-" + id);
@@ -374,7 +381,7 @@ function all_counters_callback() {
feedu.innerHTML = ctr;
- if (ctr > 0) {
+ if (ctr > 0) {
feedctr.className = "odd";
if (!feedr.className.match("Unread")) {
var is_selected = feedr.className.match("Selected");