diff --git a/webAO/client.ts b/webAO/client.ts index f897d71e..4a61c9c4 100644 --- a/webAO/client.ts +++ b/webAO/client.ts @@ -85,12 +85,12 @@ export function main() { } } - if (window.location.protocol === "https:" && connectionString.startsWith("ws://")) { - // If protocol is https: and connectionString is ws:// - // We have a problem, since it's impossible to connect to ws:// from https:// - // Connection will fail, but at least warn the user - alert('Attempted to connect using insecure websockets on https page. Please try removing s from https:// in the URL bar.') - } + if (window.location.protocol === "https:" && connectionString.startsWith("ws://")) { + // If protocol is https: and connectionString is ws:// + // We have a problem, since it's impossible to connect to ws:// from https:// + // Connection will fail, but at least warn the user + alert('WS not supported on HTTPS. Please try removing the s from https:// at the start of the URL bar. (You might have to click inside the URL bar to see it)') + } client = new Client(connectionString); client.connect()