Files
website/assets/js/global.js
2025-12-03 09:59:01 -06:00

13 lines
440 B
JavaScript

const parser = new DOMParser();
fetch("/_bottomnav.html")
.then(response => response.text())
.then(text => {
const bottomNavHTML = parser.parseFromString(text, "text/html");
const bottomNav = bottomNavHTML.getElementById("bottomnav");
const pathSpan = bottomNav.querySelector("span");
pathSpan.innerText = pathSpan.innerText.replace("%PATH%", document.location.pathname);
document.body.appendChild(bottomNav);
});