diff options
Diffstat (limited to 'themes/tabi-lean/static/js/footnoteBacklinks.min.js')
| -rw-r--r-- | themes/tabi-lean/static/js/footnoteBacklinks.min.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/themes/tabi-lean/static/js/footnoteBacklinks.min.js b/themes/tabi-lean/static/js/footnoteBacklinks.min.js new file mode 100644 index 0000000..c2175a7 --- /dev/null +++ b/themes/tabi-lean/static/js/footnoteBacklinks.min.js @@ -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); |
