diff options
| author | czaks <marcin@6irc.net> | 2013-12-29 01:10:35 +0100 |
|---|---|---|
| committer | czaks <marcin@6irc.net> | 2013-12-29 01:10:35 +0100 |
| commit | 371685140a0cf4fd4286e0da32c045a466799348 (patch) | |
| tree | b86fdcc3f9d184fab6bb3ad8508b1711d9afcd08 /js/titlebar-notifications.js | |
| parent | 2664a849748d8d1f44c9ccd23ab6429e5e8a8940 (diff) | |
watch.js: watch board + watch thread + tool for pinning boards; currently may not work the best at mobiles and without compact-boardlist
Diffstat (limited to 'js/titlebar-notifications.js')
| -rw-r--r-- | js/titlebar-notifications.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/js/titlebar-notifications.js b/js/titlebar-notifications.js new file mode 100644 index 00000000..329c8812 --- /dev/null +++ b/js/titlebar-notifications.js @@ -0,0 +1,18 @@ +var orig_title = document.title; + +$(function(){ + orig_title = document.title; +}); + +update_title = function() { + var updates = 0; + for(var i in title_collectors) { + updates += title_collectors[i](); + } + document.title = (updates ? "("+updates+") " : "") + orig_title; +}; + +var title_collectors = []; +add_title_collector = function(f) { + title_collectors.push(f); +}; |
