const KEY = "gate-ok-"+location.hostname+location.pathname; const html = document.documentElement, gate = document.getElementById('gate'); function showGate(){ html.classList.add('gated'); gate.style.display='flex'; } function ok(){ try{sessionStorage.setItem(KEY,'1');}catch(e){} html.classList.remove('gated'); if(gate) gate.remove(); } function tryPass(){ const pw = document.getElementById('pw'); const msg = document.getElementById('msg'); (pw && pw.value===PASS) ? ok() : (msg && (msg.style.display='block')); } if (sessionStorage.getItem(KEY)==='1') return; document.addEventListener('DOMContentLoaded', function(){ showGate(); document.getElementById('enter').addEventListener('click', tryPass); document.getElementById('pw').addEventListener('keyup', function(e){ if(e.key==='Enter') tryPass(); }); }); })();

Enter Pass Code to Continue