improved link highlighting
This commit is contained in:
parent
49c1288a0b
commit
ddc0698605
@ -117,9 +117,7 @@ document.addEventListener("DOMContentLoaded", () => {
|
||||
document.body.addEventListener("click", e => {
|
||||
if (e.target.matches("[data-link]")) {
|
||||
e.preventDefault();
|
||||
document.querySelectorAll('[data-link]').forEach(e => {
|
||||
e.classList.remove('active');
|
||||
});
|
||||
document.querySelector('[data-link].active').classList.remove('active');
|
||||
e.target.classList.add('active');
|
||||
navigateTo(e.target.href.slice(location.origin.length));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user