Runtime module for footnote hover tooltips and bidirectional scroll navigation.
Sets up three types of DOM interactions:
Click on a.footnoteref -- scrolls to the corresponding footnote body
Click on a link inside .footnote-footer -- scrolls back to the reference
Hover on a.footnoteref -- shows a Wikidot-compatible tooltip with the
footnote content
Tooltips are pre-built during initialization and appended to a dedicated
#odialog-hovertips container element. Positioning is calculated
dynamically on each hover to account for scroll position.
DOM interactions:
Listens for click (bubble) for footnote ref/body navigation
Listens for mouseenter (capture) on a.footnoteref to show tooltip
Listens for mouseleave (capture) on a.footnoteref to hide tooltip
Creates #odialog-hovertips container appended to document.body
The destroy() cleanup function removes all event listeners and the
tooltip container element.
Runtime module for footnote hover tooltips and bidirectional scroll navigation.
Sets up three types of DOM interactions:
a.footnoteref-- scrolls to the corresponding footnote body.footnote-footer-- scrolls back to the referencea.footnoteref-- shows a Wikidot-compatible tooltip with the footnote contentTooltips are pre-built during initialization and appended to a dedicated
#odialog-hovertipscontainer element. Positioning is calculated dynamically on each hover to account for scroll position.DOM interactions:
click(bubble) for footnote ref/body navigationmouseenter(capture) ona.footnoterefto show tooltipmouseleave(capture) ona.footnoterefto hide tooltip#odialog-hovertipscontainer appended todocument.bodyThe
destroy()cleanup function removes all event listeners and the tooltip container element.