fix: doom on the home page showed two $ ls blocks (its own + the always-open home menu)
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user