fixed but with matching https:// and wss://

This commit is contained in:
sm
2015-08-30 02:29:10 -07:00
parent bb5f76cd97
commit ea5a1f902a
+6 -1
View File
@@ -63,7 +63,12 @@ function loadCode() {
}
function wsurl() {
return "ws://" + window.location.host + "/ws/";
var url = "ws://";
if(window.location.protocol == "https:") {
url = "wss://";
}
url = url + window.location.host + "/ws/";
return url;
}
function getGameID() {