Remove href from the navigation link to the current page (#1356)

* Remove href from link to active page

* Update CHANGELOG.md

Co-authored-by: Matt Wang <matt@matthewwang.me>

---------

Co-authored-by: Matt Wang <matt@matthewwang.me>
This commit is contained in:
Peter Mosses
2023-09-29 22:33:15 +02:00
committed by GitHub
parent b342531fe4
commit cd4f1b02b2
2 changed files with 6 additions and 1 deletions

View File

@@ -501,6 +501,7 @@ function activateNav() {
var target = navLink();
if (target) {
target.classList.toggle('active', true);
target.removeAttribute('href');
}
while (target) {
while (target && !(target.classList && target.classList.contains('nav-list-item'))) {