Improve sections

This commit is contained in:
2026-04-28 17:43:20 +02:00
parent 1f7cfd637a
commit 73a8b4f78f
6 changed files with 59 additions and 2 deletions
+11
View File
@@ -0,0 +1,11 @@
(function () {
document.querySelectorAll('.content h1, .content h2, .content h3, .content h4, .content h5, .content h6').forEach(function (h) {
if (!h.id) return;
var a = document.createElement('a');
a.href = '#' + h.id;
a.className = 'heading-anchor';
a.setAttribute('aria-label', 'Link to this section');
a.textContent = '§';
h.insertBefore(a, h.firstChild);
});
}());