Skip to content

Commit

Permalink
feat: Enable toggling for anchor setting
Browse files Browse the repository at this point in the history
upon clicking page-intern links.

This comes in handy when anchors are not wanted.
Currently our htmx deployment is such a situation.
  • Loading branch information
AiyionPrime committed Jan 5, 2025
1 parent 466238c commit 08370e4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions js/grayscale.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ document.addEventListener("DOMContentLoaded", function () {
top: targetElement.offsetTop,
behavior: "smooth",
});
if (link.classList.contains("nohref")) {
return;
}
window.location.href = href;
}
});
Expand Down

0 comments on commit 08370e4

Please sign in to comment.