✨ feat: add backlinks to footnotes (#101)
This commit is contained in:
1
static/js/footnoteBacklinks.min.js
vendored
Normal file
1
static/js/footnoteBacklinks.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
function assignReferenceIds(){for(const e of document.querySelectorAll(".footnote-reference"))e.id="ref:"+e.children[0].hash.substring(1)}function createFootnoteBacklinks(){for(const n of document.querySelectorAll(".footnote-definition")){var e,t="ref:"+n.id;document.getElementById(t)&&((e=document.createElement("a")).href="#"+t,e.className="footnote-backlink",e.textContent="↩",n.lastElementChild.appendChild(e))}}function initFootnotes(){assignReferenceIds(),createFootnoteBacklinks()}window.addEventListener("load",initFootnotes);
|
Reference in New Issue
Block a user