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; break;
case "KeyM": case "KeyM":
var menu = document.getElementById("topmenu") var menu = document.getElementById("topmenu")
if (!menu.open) {
menu.open = true menu.open = true
menu.querySelector("a").focus() menu.querySelector("a").focus()
} else {
menu.open = false
}
break break
case "Escape": case "Escape":
var menu = document.getElementById("topmenu") var menu = document.getElementById("topmenu")