forked from leftypol/leftypol
watch.js: watch board + watch thread + tool for pinning boards; currently may not work the best at mobiles and without compact-boardlist
This commit is contained in:
parent
2664a84974
commit
371685140a
3 changed files with 365 additions and 4 deletions
18
js/titlebar-notifications.js
Normal file
18
js/titlebar-notifications.js
Normal file
|
@ -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);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue