From c83e2143205dfeb10bfe3c6bcdf48975ba4cbe6a Mon Sep 17 00:00:00 2001 From: Aevann Date: Sat, 22 Jul 2023 20:43:32 +0300 Subject: [PATCH] add CTRL+enter in award modal --- files/assets/js/core.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/files/assets/js/core.js b/files/assets/js/core.js index e6c9c4a912..b0dce9d3cf 100644 --- a/files/assets/js/core.js +++ b/files/assets/js/core.js @@ -118,6 +118,11 @@ if (!location.pathname.endsWith('/submit')) const formDOM = targetDOM.parentElement; + if (formDOM.id == 'note_section') { + document.getElementById('giveaward').click(); + return + } + const submitButtonDOMs = formDOM.querySelectorAll('input[type=submit], .btn-primary'); if(submitButtonDOMs.length === 0) throw new TypeError("I am unable to find the submit button :(. Contact the head custodian immediately.")