summaryrefslogtreecommitdiff
path: root/js/titlebar-notifications.js
blob: 329c881207fbe8bc22c6de6077b60f0b9b4b47a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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);
};