diff --git a/static/js/admin.js b/static/js/admin.js index a484728f..86ede176 100755 --- a/static/js/admin.js +++ b/static/js/admin.js @@ -49,7 +49,7 @@ socket.on("pw", function(msg) refresh_scroll(); - localStorage.setItem("passord_i_klartekst_lol", msg); + localStorage.setItem(chan.toLowerCase(), msg); Materialize.toast("Correct password. You now have access to the sacred relam of The Admin.", 4000); }); diff --git a/static/js/youtube.js b/static/js/youtube.js index 37ac5d59..0f18da5d 100755 --- a/static/js/youtube.js +++ b/static/js/youtube.js @@ -114,6 +114,11 @@ $(document).ready(function() firstScriptTag = document.getElementsByTagName('script')[0]; firstScriptTag.parentNode.insertBefore(tag, firstScriptTag); + if(localStorage[chan.toLowerCase()]) + { + socket.emit("password", localStorage[chan.toLowerCase()]); + } + if($("#chan").html().toLowerCase() == "jazz") { //loadjsfile("static/js/jazzscript.js");