function confirmAge() { let ageGate = document.getElementById("age_gate_block"); ageGate.style.opacity = 0; setTimeout(() => { ageGate.parentElement.removeChild(ageGate); }, 1000); document.cookie += "AgeConfirmed=true; path=/; max-age=31536000" }