1
0
mirror of https://github.com/Saiyan/rc-unread_favicon.git synced 2026-02-14 00:28:38 +01:00
This commit is contained in:
2016-05-24 10:55:44 +02:00
parent 7833afec1f
commit 31a0666fdb
4 changed files with 65 additions and 0 deletions

22
unread_favicon.js Normal file
View File

@@ -0,0 +1,22 @@
function updateFavicon(){
var count = 0;
$('.unreadcount').each(function(){
var c = parseInt($(this).text());
if(c && !isNaN(c)){
count += c;
}
});
if(count !== last)
favicon.badge(count);
}
/*****************************/
var last = -1;
var favicon=new Favico({
animation:'pop'
});
window.setInterval(updateFavicon, 10000);