mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
fixed error when browser is updated
This commit is contained in:
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
@@ -3,9 +3,14 @@ var Crypt = {
|
|||||||
conf_arr: {},
|
conf_arr: {},
|
||||||
|
|
||||||
init: function(){
|
init: function(){
|
||||||
|
try{
|
||||||
conf_arr = Crypt.decrypt(Crypt.getCookie("_opt"), "_opt");
|
conf_arr = Crypt.decrypt(Crypt.getCookie("_opt"), "_opt");
|
||||||
conf_pass = Crypt.decrypt(Crypt.getCookie(chan.toLowerCase()), chan.toLowerCase());
|
conf_pass = Crypt.decrypt(Crypt.getCookie(chan.toLowerCase()), chan.toLowerCase());
|
||||||
|
}catch(err){
|
||||||
|
console.log("err")
|
||||||
|
conf_arr = Crypt.decrypt(Crypt.create_cookie("_opt"), "_opt");
|
||||||
|
conf_pass = Crypt.decrypt(Crypt.create_cookie(chan.toLowerCase()), chan.toLowerCase());
|
||||||
|
}
|
||||||
Hostcontroller.change_enabled(conf_arr.remote);
|
Hostcontroller.change_enabled(conf_arr.remote);
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -15,12 +20,12 @@ var Crypt = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var decrypted = CryptoJS.AES.decrypt(
|
var decrypted = CryptoJS.AES.decrypt(
|
||||||
cookie,navigator.userAgent+navigator.languages,
|
cookie,navigator.userAgent+navigator.languages,
|
||||||
{
|
{
|
||||||
mode: CryptoJS.mode.CBC,
|
mode: CryptoJS.mode.CBC,
|
||||||
padding: CryptoJS.pad.Pkcs7
|
padding: CryptoJS.pad.Pkcs7
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
return $.parseJSON(decrypted.toString(CryptoJS.enc.Utf8));
|
return $.parseJSON(decrypted.toString(CryptoJS.enc.Utf8));
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -45,7 +45,6 @@ var connection_options = {
|
|||||||
|
|
||||||
if(window.location.hostname == "zoff.no") add = "dev.zoff.no";
|
if(window.location.hostname == "zoff.no") add = "dev.zoff.no";
|
||||||
else add = "localhost";
|
else add = "localhost";
|
||||||
|
|
||||||
var socket = io.connect('http://'+add+':8880', connection_options);
|
var socket = io.connect('http://'+add+':8880', connection_options);
|
||||||
socket.on("get_list", function(){
|
socket.on("get_list", function(){
|
||||||
socket.emit('list', chan.toLowerCase());
|
socket.emit('list', chan.toLowerCase());
|
||||||
|
|||||||
Reference in New Issue
Block a user