var wsUri; wsUri = window.location.protocol + "//" + window.location.host + "/ws"; wsUri = wsUri.replace (/^http/i, "ws"); //wsUri = "ws://testserver.deliantra.net:13327/ws"; //wsUri = "ws://localhost:13327/ws";