|
|
@ -1522,9 +1522,6 @@ function initUrls(root) { |
|
|
|
} else { |
|
|
|
urls.ws.protocol = "ws:"; |
|
|
|
} |
|
|
|
<!-- removeIf(!cleanIt) --> |
|
|
|
urls.ws.port = Number(urls.ws.port) + 1; |
|
|
|
<!-- endRemoveIf(!cleanIt) --> |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
@ -1532,37 +1529,24 @@ function connectToURL(url) { |
|
|
|
|
|
|
|
initUrls(url); |
|
|
|
|
|
|
|
<!-- removeIf(!cleanIt) --> |
|
|
|
/* |
|
|
|
<!-- endRemoveIf(!cleanIt) --> |
|
|
|
$.ajax({ |
|
|
|
'method': 'GET', |
|
|
|
'crossDomain': true, |
|
|
|
'url': urls.auth.href, |
|
|
|
'xhrFields': { 'withCredentials': true } |
|
|
|
}).done(function(data) { |
|
|
|
<!-- removeIf(!cleanIt) --> |
|
|
|
*/ |
|
|
|
<!-- endRemoveIf(!cleanIt) --> |
|
|
|
if (websock) { |
|
|
|
websock.close(); |
|
|
|
} |
|
|
|
websock = new WebSocket(urls.ws.href); |
|
|
|
websock.onmessage = function (evt) { |
|
|
|
var data = getJson(evt.data.replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/\t/g, "\\t")); |
|
|
|
if (data) { |
|
|
|
processData(data); |
|
|
|
} |
|
|
|
}; |
|
|
|
<!-- removeIf(!cleanIt) --> |
|
|
|
/* |
|
|
|
<!-- endRemoveIf(!cleanIt) --> |
|
|
|
if (websock) { websock.close(); } |
|
|
|
websock = new WebSocket(urls.ws.href); |
|
|
|
websock.onmessage = function(evt) { |
|
|
|
var data = getJson(evt.data.replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/\t/g, "\\t")); |
|
|
|
if (data) { |
|
|
|
processData(data); |
|
|
|
} |
|
|
|
}; |
|
|
|
}).fail(function() { |
|
|
|
// Nothing to do, reload page and retry
|
|
|
|
}); |
|
|
|
<!-- removeIf(!cleanIt) --> |
|
|
|
*/ |
|
|
|
<!-- endRemoveIf(!cleanIt) --> |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
function connect(host) { |
|
|
|