Dont flash chat icon on joins and skips

This commit is contained in:
Nicolas A. Tonne
2015-05-18 16:31:36 +02:00
parent e0ade2757c
commit ec2c9cda08

View File

@@ -67,12 +67,14 @@ socket.on("chat,"+chan.toLowerCase(), function(data)
{ {
if($("#chat-bar").position()["left"] != 0) if($("#chat-bar").position()["left"] != 0)
{ {
//$("#chat-btn").css("color", "grey"); if(data.indexOf(":") >= 0){
if(!blink_interval_exists) //$("#chat-btn").css("color", "grey");
{ if(!blink_interval_exists)
$("#favicon").attr("href", "static/images/highlogo.png"); {
blink_interval_exists = true; $("#favicon").attr("href", "static/images/highlogo.png");
blink_interval = setInterval(chat_blink, 2000); blink_interval_exists = true;
blink_interval = setInterval(chat_blink, 2000);
}
} }
} }
var color = intToARGB(hashCode(data.substring(0,data.indexOf(": ")))).substring(0,6); var color = intToARGB(hashCode(data.substring(0,data.indexOf(": ")))).substring(0,6);