diff --git a/assets/js/shell.js b/assets/js/shell.js index 53f11be..de549d6 100644 --- a/assets/js/shell.js +++ b/assets/js/shell.js @@ -241,6 +241,19 @@ // re-run the same wiring a real pjax navigation would (file-row hover/ // click, route rebuilding) against this injected markup document.dispatchEvent(new CustomEvent("pjax:load")); + + // the home page's always-open menu lives in the header, not #main-content + // — hide it too, otherwise its own "$ ls" sits right above doom's and + // the listing looks doubled. restored on the next real navigation + // (leaving doom), which also fires pjax:load — registered after the + // dispatch above so it doesn't just catch its own event. + if (menu && !menu.hidden) { + menu.hidden = true; + document.addEventListener("pjax:load", function unhide() { + menu.hidden = false; + document.removeEventListener("pjax:load", unhide); + }, { once: true }); + } } function egg(lc, raw) {