1(function () { 2 const closeModal = document.querySelector('[data-action="close-modal"]'); 3 const modal = document.querySelector(".notification-modal"); 4 const overlay = document.querySelector(".notification-modal-overlay"); 5 6 if (!modal || !closeModal) return; 7 8 const handleModalClose = () => { 9 modal.classList.add("invisible"); 10 modal.classList.add("opacity-0"); 11 modal.setAttribute("aria-modal", "false"); 12 modal.setAttribute("hidden", "true"); 13 overlay.classList.add("invisible"); 14 overlay.classList.add("opacity-0"); 15 16 // Add Cookie 17 document.cookie = "showModal" + "=" + "false" + " ;path=/"; 18 }; 19 20 const checkCookie = () => { 21 const cookies = document.cookie; 22 23 if (!cookies.includes("showModal=false")) { 24 let modalTimeout; 25 26 clearTimeout(modalTimeout); 27 28 modalTimeout = setTimeout(() => { 29 modal.classList.remove("invisible"); 30 modal.classList.remove("opacity-0"); 31 modal.setAttribute("aria-modal", "true"); 32 modal.removeAttribute("hidden"); 33 overlay.removeAttribute("hidden"); 34 overlay.classList.remove("invisible"); 35 overlay.classList.remove("opacity-0"); 36 }, 1000); 37 } else { 38 return; 39 } 40 }; 41 42 closeModal.addEventListener("click", handleModalClose); 43 document.addEventListener("keydown", (event) => { 44 if (event.key === "Escape") { 45 handleModalClose(); 46 } 47 }); 48 49 checkCookie(); 50})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.