From: Andrew Dolgov Date: Sun, 12 Sep 2010 08:16:50 +0000 (+0400) Subject: digest: show number of unread articles in the title X-Git-Tag: 1.5.0~435^2~1^2~32 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=4311cc7e177a4c066d87f39d8b654420617172c1;p=tt-rss.git digest: show number of unread articles in the title --- diff --git a/digest.js b/digest.js index a3cbb487..777473c6 100644 --- a/digest.js +++ b/digest.js @@ -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); + } +} + diff --git a/digest.php b/digest.php index 467f6c28..c217d2ab 100644 --- a/digest.php +++ b/digest.php @@ -24,7 +24,7 @@ - Tiny Tiny Digest + Tiny Tiny RSS