Spaces:
Running
on
Zero
Running
on
Zero
File size: 661 Bytes
4d6f2bc 459aacb 4d6f2bc 459aacb e667f80 459aacb e667f80 459aacb e667f80 459aacb 88a4072 4d6f2bc |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
() =>{
const menu = document.querySelector("#menu");
const menuButton = menu.querySelector("button");
const content = document.querySelector("#content");
const updateMenu = () => {
const isOpen = menuButton.classList.contains("open");
content.style.display = isOpen ? "none" : "flex";
};
const observer = new MutationObserver(updateMenu);
observer.observe(menuButton, { attributes: true, attributeFilter: ["class"] });
updateMenu();
if (window.location.hostname.endsWith(".hf.space")) {
const hfHeader = document.getElementById("huggingface-space-header");
if (hfHeader) {
hfHeader.style.display = "none";
}
}
}
|