diff options
author | Andrew Dolgov <[email protected]> | 2010-09-12 12:16:50 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2010-09-12 12:16:50 +0400 |
commit | 4311cc7e177a4c066d87f39d8b654420617172c1 (patch) | |
tree | f9574ebe323d3521bbe7bca318e0bbc966d2e417 /digest.js | |
parent | c1b5cd23e068d269a2736ac4759fbaa09243f4dd (diff) |
digest: show number of unread articles in the title
Diffstat (limited to 'digest.js')
-rw-r--r-- | digest.js | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -346,6 +346,10 @@ function parse_feeds(transport) { return 0; }); + var all_articles = find_feed(feeds, -4); + + update_title(all_articles.unread); + last_feeds = feeds; redraw_feedlist(feeds); @@ -602,3 +606,16 @@ function feed_mo(elem) { exception_error("feed_mo", e); } } + +function update_title(unread) { + try { + document.title = "Tiny Tiny RSS"; + + if (unread > 0) + document.title += " (" + unread + ")"; + + } catch (e) { + exception_error("update_title", e); + } +} + |