limited url path at first occurrency of /
This commit is contained in:
parent
153e94ecc0
commit
176fb0d1d0
1 changed files with 2 additions and 1 deletions
|
@ -24,6 +24,7 @@ window.addEventListener("resize", isMobileMenu);
|
|||
const logo = document.querySelector(".logo__pathname");
|
||||
if(logo){
|
||||
window.onload = () => {
|
||||
logo.textContent += window.location.pathname.substring(1);
|
||||
const path = window.location.pathname.substring(1);
|
||||
logo.textContent += path.substring(0,path.indexOf('/'));
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue