aboutsummaryrefslogtreecommitdiff
path: root/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'index.js')
-rw-r--r--index.js13
1 files changed, 9 insertions, 4 deletions
diff --git a/index.js b/index.js
index 879faf1..28d22e6 100644
--- a/index.js
+++ b/index.js
@@ -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() {