mirror of
https://github.com/andwati/pwnforfunandprofit.xyz.git
synced 2026-10-18 02:12:52 +00:00
16 lines
424 B
JavaScript
16 lines
424 B
JavaScript
(function () {
|
|
'use strict';
|
|
|
|
document
|
|
.querySelectorAll('.post-body h2[id], .post-body h3[id]')
|
|
.forEach(function (heading) {
|
|
var a = document.createElement('a');
|
|
a.href = '#' + heading.id;
|
|
a.className = 'heading-anchor';
|
|
a.setAttribute('aria-label', 'Link to this section');
|
|
a.setAttribute('tabindex', '-1');
|
|
a.textContent = '#';
|
|
heading.appendChild(a);
|
|
});
|
|
})();
|