From e8068ee8c2a4dbc4d3b5138829cd939f842a083b Mon Sep 17 00:00:00 2001 From: Ted Pier Date: Sun, 3 Aug 2025 16:11:00 -0700 Subject: [PATCH] contact section --- script.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/script.js b/script.js index 415530c..69c61b9 100644 --- a/script.js +++ b/script.js @@ -1,11 +1,14 @@ const $ = (id) => document.getElementById(id); const infoContainer = $("contact-info-container"); -infoContainer.addEventListener("click", () => { +infoContainer.addEventListener("click", loadContactInfo); + +function loadContactInfo() { fetch("contact-info.obfuscated") .then((response) => response.text()) .then((text) => { infoContainer.innerHTML = atob(text); infoContainer.classList.remove("cover"); + infoContainer.removeEventListener("click", loadContactInfo); }); -}); +}