docs/headers.js

9 lines
260 B
JavaScript
Raw Normal View History

2021-12-29 01:55:43 +00:00
for (const el of document.querySelectorAll("[id]")) {
el.classList.add("haspara")
const pilcrow = document.createElement("a");
pilcrow.className = "pilcrow"
pilcrow.href = "#" + el.id;
pilcrow.innerHTML = "¶"
el.prepend(pilcrow)
}