diff --git a/ui/js/arena.js b/ui/js/arena.js index b5f486d..b98b477 100644 --- a/ui/js/arena.js +++ b/ui/js/arena.js @@ -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() {