diff options
| author | Tyler Hoang <tyler@tylerhoang.xyz> | 2026-05-28 21:07:30 -0700 |
|---|---|---|
| committer | Tyler Hoang <tyler@tylerhoang.xyz> | 2026-05-28 21:07:30 -0700 |
| commit | 8691989d150eeb092b7ea58290658a024a90fcd4 (patch) | |
| tree | 120cdeadbde9929748eceef238269800c378dd6e /index.js | |
| parent | 34f0486f091ded7112442a00f8c5c5ecae342265 (diff) | |
neighbors: open contact window on "drop a line" instead of mailto
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'index.js')
| -rw-r--r-- | index.js | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -51,13 +51,18 @@ ); }); + function openWindow(id) { + const w = document.getElementById('w-' + id); + if (w) { w.style.display = ''; w.style.zIndex = (++window.__zTop || (window.__zTop = 100)); } + } + document.querySelectorAll('.icon').forEach(ic => { - ic.addEventListener('click', () => { - const w = document.getElementById('w-' + ic.dataset.open); - if (w) { w.style.display = ''; w.style.zIndex = (++window.__zTop || (window.__zTop = 100)); } - }); + ic.addEventListener('click', () => openWindow(ic.dataset.open)); }); + const dropALine = document.getElementById('neighbors-contact-link'); + if (dropALine) dropALine.addEventListener('click', e => { e.preventDefault(); openWindow('guestbook'); }); + // podcast RSS let podLoaded = false; async function loadPodcast() { |
