mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Merge branch 'master' of github.com:nixolas1/Zoff
This commit is contained in:
@@ -14,7 +14,10 @@ socket.on("toast", function(msg)
|
||||
break;
|
||||
case "wrongpass":
|
||||
msg=rnd(["That's not the right password!", "Wrong! Better luck next time...", "You seem to have mistyped the password", "Incorrect. Have you tried meditating?","Nope, wrong password!", "Wrong password. The authorities have been notified."])
|
||||
break;
|
||||
if(localStorage[chan.toLowerCase()]){
|
||||
localStorage.removeItem(chan.toLowerCase());
|
||||
}
|
||||
break;
|
||||
case "shuffled":
|
||||
msg=rnd(["♫ You stir me right round, baby. ♫","♫ Stir, stir, stir my boat ♫","I vigorously stirred your playlist!", "I hope you like your list stirred, not shaken.", "I shuffled your playlist with the cosmic background radiation as a seed. Enjoy.", "100% randomized, for your listening pleasure!", "I hope you enjoy your fresh playlist!"])
|
||||
break;
|
||||
@@ -75,12 +78,13 @@ $('input[class=conf]').change(function()
|
||||
|
||||
function pass_save()
|
||||
{
|
||||
socket.emit('password', [document.getElementById("password").value, chan.toLowerCase(), guid]);
|
||||
|
||||
socket.emit('password', [CryptoJS.SHA256(document.getElementById("password").value).toString(), chan.toLowerCase(), guid]);
|
||||
}
|
||||
|
||||
function log_out(){
|
||||
if(localStorage[chan.toLowerCase()]){
|
||||
localStorage.removeItem(chan.toLowerCase())
|
||||
localStorage.removeItem(chan.toLowerCase());
|
||||
w_p = true;
|
||||
names=["vote","addsongs","longsongs","frontpage", "allvideos", "removeplay", "skip", "shuffle"];
|
||||
for (var i = 0; i < names.length; i++) {
|
||||
|
||||
@@ -29,8 +29,10 @@ $(".chat-tab").click(function(){
|
||||
$("#text-chat-input").focus();
|
||||
});
|
||||
|
||||
socket.on("chat.all", function(data)
|
||||
socket.on("chat.all", function(inp)
|
||||
{
|
||||
data = inp[0];
|
||||
|
||||
if($("#chat-bar").position()["left"] != 0)
|
||||
{
|
||||
//$("#chat-btn").css("color", "grey");
|
||||
@@ -46,9 +48,9 @@ socket.on("chat.all", function(data)
|
||||
$("#favicon").attr("href", "static/images/highlogo.png");
|
||||
unseen = true;
|
||||
}
|
||||
var color = intToARGB(hashCode(data.substring(0,8))).substring(0,6);
|
||||
$("#chatall").append("<li><span style='color:"+color+";'>"+data.substring(0,8)+"</span></li>");
|
||||
var in_text = document.createTextNode(data.substring(8));
|
||||
var color = intToARGB(hashCode(data.substring(0,data.indexOf(": ")))).substring(0,6);
|
||||
$("#chatall").append("<li title='"+inp[1]+"'><span style='color:"+color+";'>"+data.substring(0,data.indexOf(": "))+"</span></li>");
|
||||
var in_text = document.createTextNode(data.substring(data.indexOf(": ")));
|
||||
$("#chatall li:last")[0].appendChild(in_text);
|
||||
document.getElementById("chatall").scrollTop = document.getElementById("chatall").scrollHeight
|
||||
});
|
||||
@@ -73,9 +75,9 @@ socket.on("chat,"+chan.toLowerCase(), function(data)
|
||||
blink_interval = setInterval(chat_blink, 2000);
|
||||
}
|
||||
}
|
||||
var color = intToARGB(hashCode(data.substring(0,8))).substring(0,6);
|
||||
$("#chatchannel").append("<li><span style='color:"+color+";'>"+data.substring(0,8)+"</span></li>");
|
||||
var in_text = document.createTextNode(data.substring(8));
|
||||
var color = intToARGB(hashCode(data.substring(0,data.indexOf(": ")))).substring(0,6);
|
||||
$("#chatchannel").append("<li><span style='color:"+color+";'>"+data.substring(0,data.indexOf(": "))+"</span></li>");
|
||||
var in_text = document.createTextNode(data.substring(data.indexOf(": ")));
|
||||
$("#chatchannel li:last")[0].appendChild(in_text);
|
||||
document.getElementById("chatchannel").scrollTop = document.getElementById("chatchannel").scrollHeight
|
||||
});
|
||||
|
||||
@@ -73,7 +73,7 @@ socket.on(chan.toLowerCase()+",viewers", function(view)
|
||||
|
||||
$(document).ready(function()
|
||||
{
|
||||
|
||||
Materialize.toast("Passwords have been reset. If anything is not right, please send us a mail @ contact@zoff.no", 10000);
|
||||
$("#settings").sideNav({
|
||||
menuWidth: 300, // Default is 240
|
||||
edge: 'right', // Choose the horizontal origin
|
||||
@@ -104,7 +104,8 @@ $(document).ready(function()
|
||||
|
||||
if(localStorage[chan.toLowerCase()])
|
||||
{
|
||||
socket.emit("password", [localStorage[chan.toLowerCase()], chan.toLowerCase(), guid]);
|
||||
localStorage.removeItem(chan.toLowerCase());
|
||||
//socket.emit("password", [localStorage[chan.toLowerCase()], chan.toLowerCase(), guid]);
|
||||
}
|
||||
|
||||
if($("#chan").html().toLowerCase() == "jazz")
|
||||
|
||||
Reference in New Issue
Block a user