Spaces:
Runtime error
Runtime error
Download docs/guide.js from welcometoFightclub/datacollection_server: direct link, hf CLI and curl.
- Browser
- Download file 1.3 kB
-
https://huggingface.co/spaces/welcometoFightclub/datacollection_server/resolve/main/docs/guide.js
- Command line
-
hf download hf://spaces/welcometoFightclub/datacollection_server/docs/guide.js
-
curl -L -o guide.js https://huggingface.co/spaces/welcometoFightclub/datacollection_server/resolve/main/docs/guide.js
1.3 kB
| const navigation = document.querySelector("#navigation"); | |
| const menuButton = document.querySelector(".menu-button"); | |
| const themeButton = document.querySelector(".theme-button"); | |
| const currentFile = window.location.pathname.split("/").pop() || "index.html"; | |
| document.querySelectorAll(".navigation a").forEach((link) => { | |
| if (link.getAttribute("href") === currentFile) link.setAttribute("aria-current", "page"); | |
| }); | |
| menuButton?.addEventListener("click", () => { | |
| const open = navigation.classList.toggle("open"); | |
| menuButton.setAttribute("aria-expanded", String(open)); | |
| }); | |
| const savedTheme = localStorage.getItem("pdf-extractor-docs-theme"); | |
| if (savedTheme) document.documentElement.dataset.theme = savedTheme; | |
| themeButton?.addEventListener("click", () => { | |
| const nextTheme = document.documentElement.dataset.theme === "dark" ? "light" : "dark"; | |
| document.documentElement.dataset.theme = nextTheme; | |
| localStorage.setItem("pdf-extractor-docs-theme", nextTheme); | |
| }); | |
| document.querySelectorAll(".copy-button").forEach((button) => { | |
| button.addEventListener("click", async () => { | |
| await navigator.clipboard.writeText(button.dataset.copy || ""); | |
| const label = button.textContent; | |
| button.textContent = "Copied"; | |
| setTimeout(() => { button.textContent = label; }, 1500); | |
| }); | |
| }); | |