mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-11-13 18:40:49 +01:00
19 lines
373 B
JavaScript
19 lines
373 B
JavaScript
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);
|
|
};
|