aboutsummaryrefslogtreecommitdiffstats
path: root/res/client.js
diff options
context:
space:
mode:
Diffstat (limited to 'res/client.js')
-rw-r--r--res/client.js6
1 files changed, 2 insertions, 4 deletions
diff --git a/res/client.js b/res/client.js
index 5370c20..73c0671 100644
--- a/res/client.js
+++ b/res/client.js
@@ -977,14 +977,12 @@ client_Main.prototype = {
}
,openWebSocket: function(host,port) {
var _gthis = this;
- if(port.length > 0) {
- port = ":" + port;
- }
+ var colonPort = port.length > 0 ? ":" + port : port;
var protocol = "ws:";
if($global.location.protocol == "https:") {
protocol = "wss:";
}
- this.ws = new WebSocket("" + protocol + "//" + host + port);
+ this.ws = new WebSocket("" + protocol + "//" + host + colonPort);
this.ws.onmessage = $bind(this,this.onMessage);
this.ws.onopen = function() {
_gthis.serverMessage(1);
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage