fix footnotes
This commit is contained in:
parent
c70b4890f8
commit
17517f3ee8
2 changed files with 32 additions and 1 deletions
|
|
@ -130,6 +130,21 @@ function togglePanel(side) {
|
|||
}
|
||||
}
|
||||
|
||||
function fixFootNotes() {
|
||||
const footnotes = document.querySelectorAll('a[href^="#sdfootnote"]');
|
||||
|
||||
footnotes.forEach((footnote) => {
|
||||
const href = footnote.href;
|
||||
footnote.classList.add("footnote");
|
||||
if (href.includes("sym")) {
|
||||
footnote.id = footnote.hash.replace("sym", "anc").replace("#", "");
|
||||
}
|
||||
if (href.includes("anc")) {
|
||||
footnote.id = footnote.hash.replace("anc", "sym").replace("#", "");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
window.window.scrollTo({
|
||||
top: 0,
|
||||
|
|
@ -141,6 +156,8 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||
|
||||
setWindowHeightFactor();
|
||||
|
||||
fixFootNotes();
|
||||
|
||||
// Wait for fonts applied
|
||||
setTimeout(() => {
|
||||
enableToggleEntriesVisibility();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue