mirror of
https://github.com/Saiyan/rc-unread_favicon.git
synced 2026-02-14 00:28:38 +01:00
init
This commit is contained in:
22
unread_favicon.js
Normal file
22
unread_favicon.js
Normal 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);
|
||||
|
||||
Reference in New Issue
Block a user