import initSlides from "./slides.js" initSlides() const apiKey = "m5nqOoBc4uhAba21gZdCP3z8D3JT4GPxDXL2psd52EA" console.log(apiKey) const testDiv = document.querySelector("main div") function showAlbums() { testDiv.innerHTML } function pathnameCallback(e) { console.log(e) //testDiv.innerHTML = "" //switch (window.location.pathname) { // case "/": // testDiv.innerHTML = "
Hello first page
" // break ;; // case "/albums": // testDiv.innerHTML = "Hello albums page
" // break ;; // case "/settings": // testDiv.innerHTML = "Hello settings page
" // break ;; //} } window.addEventListener("popstate", pathnameCallback) pathnameCallback() /* add event listeners for anchor elements in footer */ function anchorRedirect(e) { e.preventDefault() window.history.pushState({}, "", e.target.href); pathnameCallback() } for (const a of document.querySelectorAll("footer a")) a.addEventListener("click", anchorRedirect)