From 429352bcaaddb6a3f4bc05eaa6f1ebc70751ab07 Mon Sep 17 00:00:00 2001 From: Petter N <131544102+Nintendoboi22@users.noreply.github.com> Date: Wed, 9 Oct 2024 20:38:54 -0400 Subject: [PATCH] se --- main.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index 888fbd4..35b58bd 100644 --- a/main.js +++ b/main.js @@ -7,8 +7,11 @@ window.addEventListener("keydown", function (e) { -document.onkeydown = function (e) { if (e.keyCode === 13) { splashText(); } }; -document.querySelector('button').addEventListener('click', () => { +document.onkeydown = function (e) { + if (e.key === "Enter") { + splashText(); + } +};document.querySelector('button').addEventListener('click', () => { while (true) {} });