Skip to content

Commit

Permalink
TASK: Initialize.js makes loadCookiebannerHtml parameters explicit
Browse files Browse the repository at this point in the history
  • Loading branch information
gjwnc authored and Nikdro committed Apr 22, 2024
1 parent 7d1d911 commit 4da0cbc
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Resources/Public/JavaScript/Initialize.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,12 @@ if (KD_GDPR_CC && document.cookie.indexOf(KD_GDPR_CC.cookieName) >= 0) {
: new Date(cookieObject.consentDate);

if (versionDate > cookieConsentDate && window.neos === undefined) {
loadCookiebannerHtml();
loadCookiebannerHtml(false, false, false);
} else if (!Array.isArray(cookieObject.consents) && !cookieObject.consents[KD_GDPR_CC.dimensionsIdentifier]) {
loadCookiebannerHtml();
loadCookiebannerHtml(false, false, false);
} else if (KD_GDPR_CC.decisionTtl > 0 && decisionExpiry < new Date()) {
//Re-Open Cookie-Consent, if TTL is expired
loadCookiebannerHtml(true, false, false);
}

window.dataLayer.push({
Expand All @@ -50,7 +53,7 @@ if (KD_GDPR_CC && document.cookie.indexOf(KD_GDPR_CC.cookieName) >= 0) {
});
} else if (document.getElementsByClassName('gdpr-cookieconsent-settings').length === 0 && window.neos === undefined) {
/*No Cookie set, not in backend & not on cookie page*/
loadCookiebannerHtml();
loadCookiebannerHtml(false, false, false);
}

var links = document.querySelectorAll('a[href*=\"#GDPR-CC-open-settings\"]');
Expand Down

0 comments on commit 4da0cbc

Please sign in to comment.