From a8de8ed88e929824bd24118577bc746849dea2ad Mon Sep 17 00:00:00 2001 From: Jonas Eberle Date: Wed, 11 Dec 2024 12:41:28 +0100 Subject: [PATCH] task: Reduce time until modal Relates: #339 Relates: #314 (cherry picked from commit 44ebe810473480d0ea9ad7f15ca6478bfb47944f) --- Resources/Public/Js/cookieman-init.js | 4 ++-- Resources/Public/Js/cookieman-init.min.js | 2 +- Resources/Public/Js/cookieman.min.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Resources/Public/Js/cookieman-init.js b/Resources/Public/Js/cookieman-init.js index bb87c7f2..9362be0e 100644 --- a/Resources/Public/Js/cookieman-init.js +++ b/Resources/Public/Js/cookieman-init.js @@ -3,9 +3,9 @@ /** global: cookieman */ if (null !== document.querySelector('[data-cookieman-showonce="1"]')) { - // wait a bit in order to a) be executed out of the main rendering thread b) give user first impression of page + // get out out of the main rendering thread setTimeout( cookieman.showOnce, - 2000 + 100 ) } diff --git a/Resources/Public/Js/cookieman-init.min.js b/Resources/Public/Js/cookieman-init.min.js index 4f2404c2..c3e162ff 100644 --- a/Resources/Public/Js/cookieman-init.min.js +++ b/Resources/Public/Js/cookieman-init.min.js @@ -1 +1 @@ -null!==document.querySelector('[data-cookieman-showonce="1"]')&&setTimeout(cookieman.showOnce,2e3); +null!==document.querySelector('[data-cookieman-showonce="1"]')&&setTimeout(cookieman.showOnce,100); diff --git a/Resources/Public/Js/cookieman.min.js b/Resources/Public/Js/cookieman.min.js index a14769db..8fe29402 100644 --- a/Resources/Public/Js/cookieman.min.js +++ b/Resources/Public/Js/cookieman.min.js @@ -1 +1 @@ -var cookieman=function(){"use strict";var e="CookieConsent",t=365,n=document.querySelector("[data-cookieman-form]"),o=document.querySelector("[data-cookieman-settings]"),r=o,i=JSON.parse(o.dataset.cookiemanSettings),c=n.querySelectorAll("[type=checkbox][name]"),a=document.querySelectorAll("[data-cookieman-save]"),s=document.querySelectorAll("[data-cookieman-accept-all]"),d=document.querySelectorAll("[data-cookieman-accept-none]"),u=[],l={};function f(){for(var n=[],o=0;o-1}))}(e);return t.reduce((function(e,t){return e&&h(t)}),t.length>0)},consenteds:p,consent:function(e){v(n.querySelector('[type=checkbox][name="'+e+'"]'),!0),f(),S()},onScriptLoaded:function(e,t,n){void 0===l[e]&&(l[e]=[]),-1===l[e].indexOf(t)?r.addEventListener("scriptLoaded",(function(o){o.detail.trackingObjectKey===e&&o.detail.scriptId===t&&n(o.detail.trackingObjectKey,o.detail.scriptId)})):n(e,t)},eventsEl:r}}(); +var cookieman=function(){"use strict";var e="CookieConsent",t=document.querySelector("[data-cookieman-form]"),n=document.querySelector("[data-cookieman-settings]"),o=n,r=JSON.parse(n.dataset.cookiemanSettings),i=t.querySelectorAll("[type=checkbox][name]"),c=document.querySelectorAll("[data-cookieman-save]"),a=document.querySelectorAll("[data-cookieman-accept-all]"),s=document.querySelectorAll("[data-cookieman-accept-none]"),u=[],d={};function l(){for(var t=[],n=0;n-1}))}(e);return t.reduce((function(e,t){return e&&m(t)}),t.length>0)},consenteds:p,consent:function(e){f(t.querySelector('[type=checkbox][name="'+e+'"]'),!0),l(),j()},onScriptLoaded:function(e,t,n){void 0===d[e]&&(d[e]=[]),-1===d[e].indexOf(t)?o.addEventListener("scriptLoaded",(function(o){o.detail.trackingObjectKey===e&&o.detail.scriptId===t&&n(o.detail.trackingObjectKey,o.detail.scriptId)})):n(e,t)},eventsEl:o}}();