Skip to content

Commit

Permalink
Fixed doc nav highlights
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbyoung committed Feb 11, 2025
1 parent 3d22215 commit 461a00e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions resources/js/client-side/aphiria.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,5 @@ const highlightToCNav = (articleElem, tocContentsElem) => {

const highlightDocNav = docNavElem => {
// We specifically do not want to consider the query string nor fragment
const currUrl = window.location.origin + window.location.pathname;
docNavElem.querySelector('a[href="' + currUrl + '"]')?.classList.add('selected');
docNavElem.querySelector('a[href="' + window.location.pathname + '"]')?.classList.add('selected');
}

0 comments on commit 461a00e

Please sign in to comment.