From: David ‘Bombe’ Roden Date: Thu, 7 Apr 2011 09:51:57 +0000 (+0200) Subject: Reset blinking tab icon when no notifications are visible. X-Git-Tag: 0.6.1^2~24 X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=commitdiff_plain;h=d0ab70772ef0709c58cc493c0c7864cd35a906ea;hp=cd13fe03bf2905915b3043af19480594c88e3f16 Reset blinking tab icon when no notifications are visible. --- diff --git a/src/main/resources/static/javascript/sone.js b/src/main/resources/static/javascript/sone.js index f167d69..1341cc0 100644 --- a/src/main/resources/static/javascript/sone.js +++ b/src/main/resources/static/javascript/sone.js @@ -1030,6 +1030,10 @@ function getStatus() { $.each(data.newReplies, function(index, value) { loadNewReply(value.id, value.sone, value.post, value.postSone); }); + /* remove activity when no notifications are visible. */ + if ($("#sone #notification-area .notification").length == 0) { + resetActivity(); + } /* do it again in 5 seconds. */ setTimeout(getStatus, 5000); } else {