Files
Konfirmsibank/public/assets/plugins/custom/cookiealert/cookiealert.bundle.js
2023-09-07 11:44:29 +07:00

2 lines
685 B
JavaScript

!function(){"use strict";var e=document.querySelector(".cookiealert"),t=document.querySelector(".acceptcookies");e&&(e.offsetHeight,function(e){for(var t=e+"=",o=decodeURIComponent(document.cookie).split(";"),c=0;c<o.length;c++){for(var n=o[c];" "===n.charAt(0);)n=n.substring(1);if(0===n.indexOf(t))return n.substring(t.length,n.length)}return""}("acceptCookies")||e.classList.add("show"),t.addEventListener("click",(function(){!function(e,t,o){var c=new Date;c.setTime(c.getTime()+24*o*60*60*1e3);var n="expires="+c.toUTCString();document.cookie=e+"="+t+";"+n+";path=/"}("acceptCookies",!0,365),e.classList.remove("show"),window.dispatchEvent(new Event("cookieAlertAccept"))})))}();