mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 07:52:24 +00:00
Deleted IPNS view, content, and asset files. Removed references to IPNS from the README, sidebar, and documentation pages. This feature is no longer supported for hosting.
20 lines
583 B
JavaScript
20 lines
583 B
JavaScript
// sidebar.js
|
|
import { setHashView } from "./hashView.js";
|
|
|
|
export function setupSidebarNavigation() {
|
|
const sidebarLinks = document.querySelectorAll('#sidebar a[href^="#view="]');
|
|
sidebarLinks.forEach((link) => {
|
|
link.addEventListener("click", (e) => {
|
|
e.preventDefault();
|
|
|
|
// e.g. "#view=about"
|
|
const href = link.getAttribute("href") || "";
|
|
const match = href.match(/^#view=(.+)/);
|
|
if (!match) return;
|
|
|
|
const viewName = match[1]; // "about", etc.
|
|
setHashView(viewName); // This changes the hash and loads the view.
|
|
});
|
|
});
|
|
}
|