From 59efa8d053fe7271ea39399637a233d43fa05cb6 Mon Sep 17 00:00:00 2001 From: linkpuff Date: Sun, 8 Nov 2020 17:42:54 +0000 Subject: [PATCH 1/2] clean unnecessary code --- ImpostorHQ.Dashboard/js/main.js | 1 - 1 file changed, 1 deletion(-) diff --git a/ImpostorHQ.Dashboard/js/main.js b/ImpostorHQ.Dashboard/js/main.js index 15dbaa8..27d67c9 100644 --- a/ImpostorHQ.Dashboard/js/main.js +++ b/ImpostorHQ.Dashboard/js/main.js @@ -30,7 +30,6 @@ const MessageFlags = window.onload = onload(); function onload() { var autoapi = window.location.href.match(/\?apikey=(.*)/); - console.log(autoapi); if (autoapi != null) { document.getElementById("apikey").value = autoapi[1]; } From 3aa1a4d4ea432b213dfcf4d8ee9966a7d3f38818 Mon Sep 17 00:00:00 2001 From: linkpuff Date: Sun, 8 Nov 2020 17:51:58 +0000 Subject: [PATCH 2/2] Disable logging in with an empty api key --- ImpostorHQ.Dashboard/js/main.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ImpostorHQ.Dashboard/js/main.js b/ImpostorHQ.Dashboard/js/main.js index 27d67c9..360eb73 100644 --- a/ImpostorHQ.Dashboard/js/main.js +++ b/ImpostorHQ.Dashboard/js/main.js @@ -36,6 +36,10 @@ function onload() { } function connect() { + if (document.getElementById("apikey").value == null) { + console.log("Empty Api Key"); + return; + }; var serverUrl; var scheme = "ws";