mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-12-08 20:48:48 +00:00
trying to fix issues with mobile-navigation with sockets
This commit is contained in:
@@ -117,7 +117,7 @@ var Channel = {
|
|||||||
maxWidth: $(window).width()-241
|
maxWidth: $(window).width()-241
|
||||||
});
|
});
|
||||||
|
|
||||||
if(socket === undefined || Helper.mobilecheck()){
|
if(socket === undefined){
|
||||||
no_socket = false;
|
no_socket = false;
|
||||||
socket = io.connect(''+add+':8080', connection_options);
|
socket = io.connect(''+add+':8080', connection_options);
|
||||||
socket.on('update_required', function(msg) {
|
socket.on('update_required', function(msg) {
|
||||||
|
|||||||
@@ -407,9 +407,14 @@ var Frontpage = {
|
|||||||
|
|
||||||
if(window.location.hostname == "zoff.me" || window.location.hostname == "fb.zoff.me") add = "https://zoff.me";
|
if(window.location.hostname == "zoff.me" || window.location.hostname == "fb.zoff.me") add = "https://zoff.me";
|
||||||
else add = window.location.hostname;
|
else add = window.location.hostname;
|
||||||
if(socket === undefined || Helper.mobilecheck() || user_auth_avoid) {
|
if(socket === undefined) {
|
||||||
|
no_socket = false;
|
||||||
socket = io.connect(''+add+':8080', connection_options);
|
socket = io.connect(''+add+':8080', connection_options);
|
||||||
socket.on('update_required', function() {
|
socket.on('update_required', function(msg) {
|
||||||
|
if(window.location.hostname == "localhost") {
|
||||||
|
console.log(msg);
|
||||||
|
return;
|
||||||
|
}
|
||||||
window.location.reload(true);
|
window.location.reload(true);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user