_favorurl: '',
_deleteurl: '',
_updatecounter: 0,
+ _windowhasfocus: false,
init: function(userid, replyurl, favorurl, deleteurl)
{
DT = document.title;
+ $(window).bind('focus', function(){ RealtimeUpdate._windowhasfocus = true; });
+
$(window).blur(function() {
$('#notices_primary .notice').removeClass('mark-top');
RealtimeUpdate._updatecounter = 0;
document.title = DT;
+ RealtimeUpdate._windowhasfocus = false;
return false;
});
SN.U.NoticeReply();
SN.U.NoticeFavor();
- RealtimeUpdate._updatecounter += 1;
- document.title = '('+RealtimeUpdate._updatecounter+') ' + DT;
+ if (RealtimeUpdate._windowhasfocus === false) {
+ RealtimeUpdate._updatecounter += 1;
+ document.title = '('+RealtimeUpdate._updatecounter+') ' + DT;
+ }
},
makeNoticeItem: function(data)