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

This commit is contained in:
Stephen McQuay 2015-08-30 02:29:10 -07:00
parent bb5f76cd97
commit ea5a1f902a

View File

@ -63,7 +63,12 @@ function loadCode() {
} }
function wsurl() { 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() { function getGameID() {