Squarespace | Age Verification

<div id="age-verification-modal" style="position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.9); z-index:9999; display:flex; align-items:center; justify-content:center; color:white; font-family:sans-serif;"> <div style="background:#1a1a1a; padding:2rem; border-radius:12px; text-align:center; max-width:400px;"> <h2>Age Verification Required</h2> <p>You must be 21+ to access this site.</p> <button id="confirm-age" style="background:#4CAF50; color:white; padding:10px 20px; border:none; border-radius:5px; cursor:pointer;">I am 21 or older</button> <button id="deny-age" style="background:#f44336; color:white; padding:10px 20px; border:none; border-radius:5px; margin-left:10px; cursor:pointer;">I am under 21</button> </div> </div> <script> if(!localStorage.getItem('ageVerified')) document.getElementById('age-verification-modal').style.display = 'flex';

Paste this (customize the age threshold and link): age verification squarespace

document.getElementById('confirm-age').onclick = function() localStorage.setItem('ageVerified', 'true'); document.getElementById('age-verification-modal').style.display = 'none'; ; div id="age-verification-modal" style="position:fixed

And on confirm:

document.getElementById('deny-age').onclick = function() window.location.href = 'https://www.google.com'; // Redirect away ; </script> The above remembers verification via browser localStorage . To reset daily, replace the if condition with: Age Verification Required&lt

const lastCheck = localStorage.getItem('ageVerifiedDate'); const today = new Date().toDateString(); if(lastCheck !== today) // show modal

Share This Page

<div id="age-verification-modal" style="position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.9); z-index:9999; display:flex; align-items:center; justify-content:center; color:white; font-family:sans-serif;"> <div style="background:#1a1a1a; padding:2rem; border-radius:12px; text-align:center; max-width:400px;"> <h2>Age Verification Required</h2> <p>You must be 21+ to access this site.</p> <button id="confirm-age" style="background:#4CAF50; color:white; padding:10px 20px; border:none; border-radius:5px; cursor:pointer;">I am 21 or older</button> <button id="deny-age" style="background:#f44336; color:white; padding:10px 20px; border:none; border-radius:5px; margin-left:10px; cursor:pointer;">I am under 21</button> </div> </div> <script> if(!localStorage.getItem('ageVerified')) document.getElementById('age-verification-modal').style.display = 'flex';

Paste this (customize the age threshold and link):

document.getElementById('confirm-age').onclick = function() localStorage.setItem('ageVerified', 'true'); document.getElementById('age-verification-modal').style.display = 'none'; ;

And on confirm:

document.getElementById('deny-age').onclick = function() window.location.href = 'https://www.google.com'; // Redirect away ; </script> The above remembers verification via browser localStorage . To reset daily, replace the if condition with:

const lastCheck = localStorage.getItem('ageVerifiedDate'); const today = new Date().toDateString(); if(lastCheck !== today) // show modal

$/Year

Koala Bear This membership is for me
Goofy Monkey This membership is for someone else

Member Information

The gift certificate will be sent immediately to the email address you enter. Enter your own email address if you would like the voucher sent to you directly.

Additional Member Leave as a guest spot

Would you like to say something?