fictioneer/js/consent.min.js
Tetrakern c439ec6f40 Increase consent banner delay
Apparently, 1 second was not enough.
2023-06-14 16:10:41 +02:00

1 line
599 B
JavaScript

const fcn_hasConsent=fcn_getCookie("fcn_cookie_consent")??"",fcn_consentBanner=_$$$("consent-banner");function fcn_loadConsentBanner(){fcn_consentBanner.classList.remove("hidden"),_$$$("consent-accept-button")?.addEventListener("click",(()=>{fcn_setCookie("fcn_cookie_consent","full"),fcn_consentBanner.classList.add("hidden")})),_$$$("consent-reject-button")?.addEventListener("click",(()=>{fcn_setCookie("fcn_cookie_consent","necessary"),fcn_consentBanner.classList.add("hidden")}))}fcn_consentBanner&&""===fcn_hasConsent?setTimeout((()=>{fcn_loadConsentBanner()}),2e3):fcn_consentBanner.remove();