From f9a49756a865e27c6e51424c2f344ff9df0de1ff Mon Sep 17 00:00:00 2001 From: Stephan Kellermayr Date: Tue, 12 Dec 2023 17:17:10 +0100 Subject: [PATCH 1/2] Added missing check whether the method initialise() exists --- Resources/Public/JavaScript/Src/bootstrap.cookieconsent.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Resources/Public/JavaScript/Src/bootstrap.cookieconsent.js b/Resources/Public/JavaScript/Src/bootstrap.cookieconsent.js index 44cf68004..03cb79cc5 100644 --- a/Resources/Public/JavaScript/Src/bootstrap.cookieconsent.js +++ b/Resources/Public/JavaScript/Src/bootstrap.cookieconsent.js @@ -140,8 +140,10 @@ window.addEventListener('DOMContentLoaded', function () { }; // Initialize - cookieConsentOptions.container = document.getElementById('cookieconsent'); - window.cookieconsent.initialise(cookieConsentOptions); + if (typeof window.cookieconsent.initialise === "function") { + cookieConsentOptions.container = document.getElementById('cookieconsent'); + window.cookieconsent.initialise(cookieConsentOptions); + } } }); From 040bc2cafac88358a193643deda0dba6b802ec07 Mon Sep 17 00:00:00 2001 From: Benjamin Kott Date: Thu, 10 Oct 2024 08:46:06 +0200 Subject: [PATCH 2/2] [BUGFIX] Add missing compiled files --- Resources/Public/JavaScript/Dist/bootstrap.cookieconsent.min.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Resources/Public/JavaScript/Dist/bootstrap.cookieconsent.min.js b/Resources/Public/JavaScript/Dist/bootstrap.cookieconsent.min.js index f257e0960..ce6b70125 100644 --- a/Resources/Public/JavaScript/Dist/bootstrap.cookieconsent.min.js +++ b/Resources/Public/JavaScript/Dist/bootstrap.cookieconsent.min.js @@ -1 +1 @@ -window.addEventListener("DOMContentLoaded",function(){if(document.getElementById("cookieconsent")){const t={layout:"basic",layouts:{basic:'
{{messagelink}}{{compliance}}
',"basic-close":'
{{messagelink}}{{compliance}}{{close}}
',"basic-header":'
{{header}}{{message}}{{link}}{{compliance}}
'},cookie:{domain:window.location.hostname,expiryDays:365},compliance:{"opt-in":'
{{deny}}{{allow}}
'},elements:{header:'

{{header}}

',dismiss:'',allow:''},window:'',revokeBtn:'
Cookie settings
',content:{header:"We use cookies",message:"This website uses cookies to ensure you get the best experience on our website.",dismiss:"Got it!",allow:"Allow cookies",deny:"Decline",link:"Learn more",href:""},law:{countryCode:null,regionalLaw:!0},type:"info",position:"bottom",revokable:!1,static:!1,location:!0,showLink:!1},i=["layout","cookie.expiryDays","content.header","content.message","content.dismiss","content.allow","content.deny","content.link","content.href","type","position","law.countryCode","law.regionalLaw","revokable","static","location"],c={updateCookieConsentOptions:function(e,o,n){for(stack=o.split(".");1{{messagelink}}{{compliance}}',"basic-close":'
{{messagelink}}{{compliance}}{{close}}
',"basic-header":'
{{header}}{{message}}{{link}}{{compliance}}
'},cookie:{domain:window.location.hostname,expiryDays:365},compliance:{"opt-in":'
{{deny}}{{allow}}
'},elements:{header:'

{{header}}

',dismiss:'',allow:''},window:'',revokeBtn:'
Cookie settings
',content:{header:"We use cookies",message:"This website uses cookies to ensure you get the best experience on our website.",dismiss:"Got it!",allow:"Allow cookies",deny:"Decline",link:"Learn more",href:""},law:{countryCode:null,regionalLaw:!0},type:"info",position:"bottom",revokable:!1,static:!1,location:!0,showLink:!1},i=["layout","cookie.expiryDays","content.header","content.message","content.dismiss","content.allow","content.deny","content.link","content.href","type","position","law.countryCode","law.regionalLaw","revokable","static","location"],c={updateCookieConsentOptions:function(e,o,n){for(stack=o.split(".");1