From fa48f58cf1ba26c24180438b65c8aa0199e2836f Mon Sep 17 00:00:00 2001 From: ENGO150 Date: Tue, 21 May 2024 19:28:34 +0200 Subject: [PATCH] fixed enter button when logging/registering --- res/index/script.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/res/index/script.js b/res/index/script.js index 924b97c..c33648c 100644 --- a/res/index/script.js +++ b/res/index/script.js @@ -73,4 +73,13 @@ function logout() document.getElementById("login_buttons").style.display = "inline"; document.getElementById("logout_button").style.display = "none"; document.getElementById("login_indicator").style.display = "none"; -} \ No newline at end of file +} + +document.addEventListener("keypress", function(event) +{ + if (event.key == "Enter" && document.getElementById("login_pane").style.display == "visible") + { + event.preventDefault(); + document.getElementById("sub_btn").click(); + } +}); \ No newline at end of file