refactor: simplify contact form timestamp with hyperscript + minimal JS

Replace 34-line IIFE/MutationObserver with:
- Hyperscript: on toggle if me.open call resetContactForm()
- 11-line resetContactForm() function

Also dispatches 'show' event from openModal() for ninja-keys integration.
All 7 contact form tests pass.
This commit is contained in:
juanatsap
2025-12-02 16:00:00 +00:00
parent 2dd0922a63
commit 6970606c42
2 changed files with 19 additions and 19 deletions
+2
View File
@@ -48,6 +48,8 @@
const modal = document.getElementById(modalId);
if (modal && modal.showModal) {
modal.showModal();
// Dispatch 'show' event for hyperscript handlers
modal.dispatchEvent(new CustomEvent('show'));
}
ninjaKeys.close();
}