only add clickable nav links to h2s

This commit is contained in:
Lynne Megido 2020-04-05 20:34:16 +10:00
parent c58a70bc73
commit 0d71757b79
Signed by: lynnesbian
GPG key ID: F0A184B5213D9F90

View file

@ -1,8 +1,6 @@
document.addEventListener('DOMContentLoaded', (event) => {
for (let i = 2; i < 7; i++) {
let headers = dgtn(`h${i}`);
Object.values(headers).forEach((header) => {
header.innerHTML += `<a class='post-nav-link' aria-hidden='true' href='#${header.id}'>#</a>`;
})
}
let headers = dgtn(`h2`);
Object.values(headers).forEach((header) => {
header.innerHTML += `<a class='post-nav-link' aria-hidden='true' href='#${header.id}'>#</a>`;
})
});