limited url path at first occurrency of /

This commit is contained in:
scosti 2023-01-26 00:59:51 +01:00
parent 153e94ecc0
commit 176fb0d1d0

View file

@ -24,6 +24,7 @@ window.addEventListener("resize", isMobileMenu);
const logo = document.querySelector(".logo__pathname"); const logo = document.querySelector(".logo__pathname");
if(logo){ if(logo){
window.onload = () => { window.onload = () => {
logo.textContent += window.location.pathname.substring(1); const path = window.location.pathname.substring(1);
logo.textContent += path.substring(0,path.indexOf('/'));
}; };
} }