1// Add cookie to browser on "yes" click 2function acceptCookie() { 3 const ageGateCookieName = "age_gate"; 4 const ageGateCookieDuration = 30; 5 const date = new Date(); 6 date.setDate( date.getDate() + ageGateCookieDuration ); 7 const expires = "expires=" + date.toUTCString(); 8 9 document.cookie = ageGateCookieName + "=1; " + expires + "; path=/"; 10 document.getElementById( "age-verify" ).style.visibility = "hidden"; 11} 12 13// Extra check to hide age gate if it's cached, but cookie already exists 14function checkAgeGateCookie(){ 15 const ageGateCookieName = "age_gate"; 16 17 if ( document.cookie.indexOf(ageGateCookieName) >= 0 ){ 18 document.getElementById("age-verify").style.visibility = "hidden"; 19 } 20} 21 22checkAgeGateCookie();
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.