toggle menu

This commit is contained in:
Ted Unangst 2023-09-13 21:00:53 -04:00
parent 386dc6f798
commit 58ecc76b90
1 changed files with 6 additions and 2 deletions

View File

@ -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")