toggle menu
Ted Unangst tedu@tedunangst.com
Wed, 13 Sep 2023 21:00:53 -0400
1 files changed,
6 insertions(+),
2 deletions(-)
jump to
M
views/honkpage.js
→
views/honkpage.js
@@ -465,8 +465,12 @@ scrollprevioushonk();
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")