From 6058893fbc2159d059aeb30a73ffcd5318c6961f Mon Sep 17 00:00:00 2001 From: Ian Hunter Date: Wed, 3 Apr 2024 10:37:13 +0100 Subject: [PATCH] Update index.html (#486) Signed-off-by: Ian Hunter --- src/js/index.html | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/js/index.html b/src/js/index.html index 84b555792..74b6903c4 100644 --- a/src/js/index.html +++ b/src/js/index.html @@ -10,6 +10,12 @@ await gnoll.roll(notation.value).then(result => output.innerHTML = result); } + // Submit on "Enter" + document.getElementById("tbNotation").addEventListener("keypress", function(event) { + if (event.key === "Enter") { + onRoll(); + } + });