mirror of
https://github.com/owntracks/recorder.git
synced 2026-03-31 23:56:51 +00:00
rename
This commit is contained in:
@@ -10,9 +10,21 @@
|
||||
};
|
||||
|
||||
window.onload = function() {
|
||||
var url = 'ws://' + location.host + '/ws';
|
||||
var num_messages = 0;
|
||||
|
||||
// console.log(JSON.stringify(location));
|
||||
// location.host localhost:8080 localhost:8083
|
||||
// location.pathname /otr/ws.html /ws.html
|
||||
|
||||
/* Remove last part of URI to determine path to Websocket in OTR */
|
||||
var url = "ws://" + location.host + "/";
|
||||
var parts = location.pathname.split('/');
|
||||
for (var i = 1; i < parts.length - 1; i++) {
|
||||
url = url + parts[i] + "/";
|
||||
}
|
||||
url = url + "ws";
|
||||
console.log(url);
|
||||
|
||||
websocket = new WebSocket(url);
|
||||
websocket.onopen = function(ev) {
|
||||
out('CONNECTED');
|
||||
Reference in New Issue
Block a user