mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
More chat improvements
This commit is contained in:
2
static/dist/embed.min.js
vendored
2
static/dist/embed.min.js
vendored
File diff suppressed because one or more lines are too long
4
static/dist/main.min.js
vendored
4
static/dist/main.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -34,18 +34,20 @@ var Chat = {
|
||||
socket.on("chat.all", function(inp)
|
||||
{
|
||||
|
||||
if($("#chat-bar").position()["left"] != 0)
|
||||
{
|
||||
|
||||
//$("#chat-btn").css("color", "grey");
|
||||
|
||||
if(!blink_interval_exists && inp.indexOf("changed name to") < 0)
|
||||
console.log(inp.indexOf("changed name to"));
|
||||
|
||||
if(!blink_interval_exists && inp.indexOf("changed name to") < 0 && !chat_active)
|
||||
{
|
||||
$("#favicon").attr("href", "static/images/highlogo.png");
|
||||
blink_interval_exists = true;
|
||||
unseen = true;
|
||||
blink_interval = setInterval(Chat.chat_blink, 2000);
|
||||
}
|
||||
}else if(document.hidden)
|
||||
|
||||
if(document.hidden)
|
||||
{
|
||||
$("#favicon").attr("href", "static/images/highlogo.png");
|
||||
unseen = true;
|
||||
@@ -69,18 +71,13 @@ var Chat = {
|
||||
{
|
||||
socket.on("chat", function(data)
|
||||
{
|
||||
if($("#chat-bar").position()["left"] != 0)
|
||||
{
|
||||
if(data[1].indexOf(":") >= 0){
|
||||
//$("#chat-btn").css("color", "grey");
|
||||
if(!blink_interval_exists && data.indexOf("changed name to") < 0)
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var color = Helper.intToARGB(Helper.hashCode(data[0]));
|
||||
if(color.length < 6) {
|
||||
for(x = color.length; x < 6; x++){
|
||||
|
||||
@@ -28,6 +28,7 @@ var lazy_load = true;
|
||||
var embed = false;
|
||||
var autoplay = true;
|
||||
var durationBegun = false;
|
||||
var chat_active = false;
|
||||
|
||||
var mobile_beginning;
|
||||
var timeout_search;
|
||||
@@ -321,6 +322,8 @@ $(document).on("submit", "#adminForm", function(e){
|
||||
});
|
||||
|
||||
$(document).on("click", ".chat-link", function(e){
|
||||
chat_active = true;
|
||||
$("#favicon").attr("href", "static/images/favicon.png");
|
||||
$("#chatPlaylist").css("display", "block");
|
||||
$("#wrapper").css("display", "none");
|
||||
$("#suggestions").css("display", "none");
|
||||
@@ -328,12 +331,14 @@ $(document).on("click", ".chat-link", function(e){
|
||||
});
|
||||
|
||||
$(document).on("click", ".playlist-link", function(e){
|
||||
chat_active = false;
|
||||
$("#chatPlaylist").css("display", "none");
|
||||
$("#wrapper").css("display", "block");
|
||||
$("#suggestions").css("display", "none");
|
||||
});
|
||||
|
||||
$(document).on("click", ".suggested-link", function(e){
|
||||
chat_active = false;
|
||||
$("#chatPlaylist").css("display", "none");
|
||||
$("#wrapper").css("display", "none");
|
||||
$("#suggestions").css("display", "block");
|
||||
|
||||
Reference in New Issue
Block a user