Fixed some issues with favicon changing

This commit is contained in:
Kasper Rynning-Tønnesen
2016-04-19 21:50:10 +02:00
parent 5142ae0ce9
commit 6fadf0204f
4 changed files with 21 additions and 7 deletions

View File

@@ -895,6 +895,13 @@ ul #chat-log{
/*background-color:rgba(0,0,0,0.2);*/
}
.chat-link{
-webkit-transition:color 1s;
-moz-transition:color 1s;
-o-transition:color 1s;
transition: color 1s;
}
#player{
height:95%;
height: calc(100% - 32px);

File diff suppressed because one or more lines are too long

View File

@@ -50,7 +50,6 @@ var Chat = {
if(document.hidden)
{
$("#favicon").attr("href", "static/images/highlogo.png");
unseen = true;
}
var color = Helper.intToARGB(Helper.hashCode(inp[0]));
if(color.length < 6) {
@@ -74,8 +73,8 @@ var Chat = {
if(!blink_interval_exists && data.indexOf("changed name to") < 0 && !chat_active)
{
$("#favicon").attr("href", "static/images/highlogo.png");
blink_interval_exists = true;
blink_interval = setInterval(Chat.chat_blink, 2000);
unseen = true;
blink_interval = setTimeout(Chat.chat_blink, 1000);
}
var color = Helper.intToARGB(Helper.hashCode(data[0]));
@@ -95,8 +94,15 @@ var Chat = {
chat_blink: function()
{
$("#chat-btn i").css("opacity", 0.5);
setTimeout(function(){$("#chat-btn i").css("opacity", 1);}, 1000);
console.log("chat_blink");
$(".chat-link").css("color", "red");
setTimeout(function(){
$(".chat-link").css("color", "white");
if(unseen){
Chat.chat_blink();
}
}, 1000);
}
}

View File

@@ -323,6 +323,7 @@ $(document).on("submit", "#adminForm", function(e){
$(document).on("click", ".chat-link", function(e){
chat_active = true;
unseen = false;
$("#favicon").attr("href", "static/images/favicon.png");
$("#chatPlaylist").css("display", "block");
$("#wrapper").css("display", "none");