forked from cloudflare/cloudflare-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ZT] Update minimum MTU (cloudflare#17522)
* Update minimum MTU * move content to footnote * Rebase and fix multiple footnote blocks --------- Co-authored-by: Kian Newman-Hazel <[email protected]>
- Loading branch information
Showing
5 changed files
with
29 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,28 @@ | ||
import { addTooltip } from "~/util/tippy"; | ||
|
||
const footnotes = document.querySelector("section.footnotes"); | ||
const footnotes = document.querySelectorAll("section.footnotes"); | ||
|
||
if (footnotes) { | ||
const notes = footnotes.querySelectorAll("li"); | ||
for (const section of footnotes) { | ||
const notes = section.querySelectorAll("li"); | ||
|
||
for (const note of notes) { | ||
const content = note.querySelector("p") as HTMLParagraphElement; | ||
for (const note of notes) { | ||
const content = note.querySelector("p") as HTMLParagraphElement; | ||
|
||
const fnrefs = document.querySelectorAll<HTMLAnchorElement>( | ||
`a[id^='${note.id.replace("fn", "fnref")}']`, | ||
); | ||
const fnrefs = document.querySelectorAll<HTMLAnchorElement>( | ||
`a[id^='${note.id.replace("fn", "fnref")}']`, | ||
); | ||
|
||
for (const fnref of fnrefs) { | ||
addTooltip(fnref, content.innerHTML); | ||
for (const fnref of fnrefs) { | ||
addTooltip(fnref, content.innerHTML); | ||
|
||
fnref.classList.add("footnote"); | ||
fnref.classList.add("footnote"); | ||
|
||
fnref.setAttribute("tabindex", "0"); | ||
fnref.removeAttribute("href"); | ||
fnref.setAttribute("tabindex", "0"); | ||
fnref.removeAttribute("href"); | ||
} | ||
} | ||
} | ||
|
||
footnotes.remove(); | ||
section.remove(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters