asked on
ASKER
ASKER
<div style="display:none">
<div id="verify" style="font-family:Helvetica,Arial,sans-serif;text-align:center">
<img src="/product_images/uploaded_images/logo-logic-us-desktop.png"/>
<div style="margin:0 auto; text-align:center">
<p style="margin-bottom:.5em;padding:6px;">
<font size=4><b>Welcome to <i>LOGIC</i>.</font size></b>
<form id="date" style="padding:6px;width:90%;margin:0 auto;text-align:center">
<p class="label" style="margin:0;display:inline-block">Please Certify Your Age:</p>
<button>Under 18</button><button>Over 18</button><br>
<div style="margin:0 auto; text-align:span">
<p><i>Site intended for adult smokers and vapers 18 years of age or older. By entering this site, you are certifying that you are an adult smoker or vaper and are 18+ years of age. Please do not enter this site if you are not legally able to purchase tobacco products in the state where you live.</i></p>
</form>
</div>
</div>
</div>
<script src="/template/colorbox-master/jquery.colorbox-min.js"></script>
<script src="/template/moment.min.js"></script>
<script>if(document.cookie.indexOf('visited=true') === -1){jQuery.colorbox({inline:!0,href:"#verify",width:"456px",height:"450px",closeButton:!1,escKey:!1});function deny(){return!1}function allow(){var e=new Date();e.setDate(e.getDate()+30);document.cookie = "visited=true; expires="+e.toUTCString();}
jQuery("#date>button").click(function(a){a.preventDefault();var b,c;a=jQuery("#m").val();b=jQuery("#d").val();c=jQuery("#y").val();if(!(a&&b&&c))return alert("Please provide a value for all date fields."),deny();a=moment(c+"-"+a+"-"+b);if(!a.isValid())return alert("Please provide a valid date."),deny();a.hours(0).minutes(0).seconds(0);if(0>moment().hours(0).minutes(0).seconds(0).add("y",-18).diff(a,"s"))return alert("Sorry, you are not old enough to view this site."),deny();allow();jQuery.colorbox.close()});}</script>
<script type="text/javascript" src="//assets.zendesk.com/external/zenbox/v2.5/zenbox.js"></script>
<style type="text/css" media="screen, projection">
ASKER
JavaScript is a dynamic, object-based language commonly used for client-side scripting in web browsers. Recently, server side JavaScript frameworks have also emerged. JavaScript runs on nearly every operating system and in almost every mainstream web browser.
TRUSTED BY