forked from Decentrala/website
fix main.js for /account
This commit is contained in:
1 file changed
+2
-1
@@ -69,6 +69,7 @@ window.addEventListener("DOMContentLoaded", () => {
|
||||
if (a.classList.contains("lang")) return;
|
||||
const href = a.getAttribute("href");
|
||||
if (!href) return;
|
||||
if (href.startsWith("/account")) return;
|
||||
if (href.startsWith("/")) {
|
||||
// Replace existing language prefix or add one
|
||||
if (href.startsWith("/sr") || href.startsWith("/en")) {
|
||||
@@ -78,7 +79,7 @@ window.addEventListener("DOMContentLoaded", () => {
|
||||
} else if (currentLang !== "sr") {
|
||||
// Only prepend language prefix for non-default languages
|
||||
a.setAttribute("href", `/${currentLang}${href}`);
|
||||
} else { }
|
||||
}
|
||||
}
|
||||
});
|
||||
hamburger?.addEventListener("click", () => isMenuOpen() ? closeMenu() : openMenu());
|
||||
|
||||
Reference in new issue
Block a user