@xiee/utils
Version:
Miscellaneous tools and utilities to manipulate HTML pages
2 lines • 385 B
JavaScript
(e=>{e.querySelectorAll('sup[id^="fnref:"] > a.footnote-ref, a.footnote-ref > sup').forEach(t=>{/^[0-9]+$/.test(t.innerText)&&(t.innerText=`[${t.innerText}]`,t.parentNode.before(e.createTextNode(" ")))}),e.querySelectorAll(".footnotes > ol > li > p ~ .footnote-return").forEach(e=>{e.previousElementSibling.lastChild.after(e)})})(document);
//# sourceMappingURL=fix-footnote.min.js.map