From ea5a1f902af0d462005bf7e4390da6816e29d30d Mon Sep 17 00:00:00 2001 From: stephen mcquay Date: Sun, 30 Aug 2015 02:29:10 -0700 Subject: [PATCH] fixed but with matching https:// and wss:// --- ui/js/arena.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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() {