From 58ecc76b901fa879b107cbb2b0b82d1bf0a8b7af Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Wed, 13 Sep 2023 21:00:53 -0400 Subject: [PATCH] toggle menu --- views/honkpage.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/views/honkpage.js b/views/honkpage.js index 3f29067..8270149 100644 --- a/views/honkpage.js +++ b/views/honkpage.js @@ -465,8 +465,12 @@ function hotkey(e) { break; case "KeyM": var menu = document.getElementById("topmenu") - menu.open = true - menu.querySelector("a").focus() + if (!menu.open) { + menu.open = true + menu.querySelector("a").focus() + } else { + menu.open = false + } break case "Escape": var menu = document.getElementById("topmenu")