Consistent linking, less confusing, partial revert of 0e82abef.
This commit is contained in:
parent
f35da10e0e
commit
8a2835a13e
1 changed files with 0 additions and 11 deletions
|
|
@ -44,17 +44,6 @@ document.addEventListener('DOMContentLoaded', () =>
|
|||
// Update nav links and add anchor links to section headers.
|
||||
sectionsWithId.forEach(anchorTarget =>
|
||||
{
|
||||
// Navigate within current page if a section for the anchor exists.
|
||||
navLinks.forEach(navLink =>
|
||||
{
|
||||
const href = navLink.getAttribute('href');
|
||||
|
||||
if (href.startsWith('/#') && href.substring(2) === anchorTarget.id)
|
||||
{
|
||||
navLink.setAttribute('href', href.substring(1));
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* @type {HTMLHeadingElement|null}
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue