Fixed something cool with the chat

This commit is contained in:
Kasper Rynning-Tønnesen
2015-05-11 14:31:04 +02:00
parent 3c9451561e
commit 9db2a40ab1
2 changed files with 3 additions and 1 deletions

View File

@@ -16,4 +16,4 @@
<meta property="og:type" content="website">
<link type="text/css" rel="stylesheet" href="static/css/materialize.min.css" media="screen,projection"/>
<link rel="stylesheet" type="text/css" href="static/css/style.css" title="Default" />
<link rel="icon" type="image/png" href="static/images/favicon.png"/>
<link rel="icon" id="favicon" type="image/png" href="static/images/favicon.png"/>

View File

@@ -17,6 +17,7 @@ document.getElementById("chat-btn").addEventListener("click", function(){
$("#chat-btn i").css("opacity", 1);
clearInterval(blink_interval);
blink_interval_exists = false;
$("#favicon").attr("href", "static/images/favicon.png");
});
socket.on("chat,"+chan.toLowerCase(), function(data)
@@ -26,6 +27,7 @@ socket.on("chat,"+chan.toLowerCase(), function(data)
//$("#chat-btn").css("color", "grey");
if(!blink_interval_exists)
{
$("#favicon").attr("href", "static/images/highlogo.png");
blink_interval_exists = true;
blink_interval = setInterval(chat_blink, 2000);
}