()
| 765 | // --- Init ----------------------------------------------------- |
| 766 | |
| 767 | function init() { |
| 768 | renderTree(); |
| 769 | renderRecentSection(); // populate recent panel from localStorage on load |
| 770 | searchInput.addEventListener("input", handleSearchInput); |
| 771 | initMobileMenu(); |
| 772 | initHashRouting(); |
| 773 | initGraphView(); |
| 774 | initKeyboardShortcuts(); // / · Ctrl+K · Escape · [ · ] |
| 775 | |
| 776 | // Honour the URL hash on first load; fall back to first note |
| 777 | const startNote = noteFromHash() || NOTES[0]; |
| 778 | if (startNote) loadNote(startNote); |
| 779 | |
| 780 | dismissSplash(); |
| 781 | } |
| 782 | |
| 783 | init(); |
no test coverage detected