Commit Graph

2 Commits

Author SHA1 Message Date
faa30b9285 Fix: Check if theme button elements exist before adding event listeners
The mermaid-init script was throwing 'Uncaught TypeError: can't access
property addEventListener, document.getElementById(...) is null' because
it tried to attach click handlers to theme toggle buttons (ayu, navy, coal,
light, rust) that may not exist on all pages.

Fixed by:
- Wrapping theme button event listener registration in null checks
- Using DOMContentLoaded fallback when document is still loading
- Keeping mermaid.initialize() call outside the check since it needs to
  run early with startOnLoad: true
2026-03-19 20:14:58 -07:00
2a54053675 Complete: Add mermaid rendering assets 2026-03-19 19:59:57 -07:00