summaryrefslogtreecommitdiff
path: root/debugmenu.js
diff options
context:
space:
mode:
authorMinteck <contact@minteck.org>2022-03-27 21:23:27 +0200
committerMinteck <contact@minteck.org>2022-03-27 21:23:27 +0200
commit9ce177d037d0aec26d51cfcba5a091155aebbfc6 (patch)
treed3bc54df6ccd675e07713fe37cc641fca427cd69 /debugmenu.js
downloadalicorn-9ce177d037d0aec26d51cfcba5a091155aebbfc6.tar.gz
alicorn-9ce177d037d0aec26d51cfcba5a091155aebbfc6.tar.bz2
alicorn-9ce177d037d0aec26d51cfcba5a091155aebbfc6.zip
Initial commit
Diffstat (limited to 'debugmenu.js')
-rw-r--r--debugmenu.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/debugmenu.js b/debugmenu.js
new file mode 100644
index 0000000..c901617
--- /dev/null
+++ b/debugmenu.js
@@ -0,0 +1,18 @@
+const DebugMenu = {
+ show: () => {
+ document.getElementById('debugging-options').classList.remove('hidden');
+ document.getElementById('debugging-options').focus();
+ },
+ processKey: (key) => {
+ if (key === "Escape" || key === "Enter") document.getElementById("debugging-option-close").click();
+ if (key === "q") document.getElementById("debugging-option-forcequit").click();
+ if (key === "d") document.getElementById("debugging-option-debug").click();
+ if (key === "c") document.getElementById("debugging-option-closeall").click();
+ if (key === "r") document.getElementById("debugging-option-reload").click();
+ },
+ hide: () => {
+ document.getElementById('debugging-options').classList.add('hidden');
+ document.getElementById('debugging-options').blur();
+ WindowManager._.refreshStack();
+ }
+} \ No newline at end of file