From 3eda33ecaab35b1206bed712822657b498013e8d Mon Sep 17 00:00:00 2001 From: IngoWinter Date: Sun, 14 Mar 2021 17:13:56 +0100 Subject: [PATCH 1/2] async changes --- assets/consent_manager_frontend.js | 4 ++-- fragments/consent_manager_box_cssjs.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/consent_manager_frontend.js b/assets/consent_manager_frontend.js index 369a5d1..5f43a6a 100644 --- a/assets/consent_manager_frontend.js +++ b/assets/consent_manager_frontend.js @@ -1,5 +1,5 @@ /* globals Cookies, consent_managerIEVersion */ -document.addEventListener('DOMContentLoaded', function () { +(function () { 'use strict'; var expires = new Date(), show = 0, @@ -188,4 +188,4 @@ document.addEventListener('DOMContentLoaded', function () { document.getElementById('consent_manager-background').classList.remove('consent_manager-hidden'); } -}); \ No newline at end of file +})(); \ No newline at end of file diff --git a/fragments/consent_manager_box_cssjs.php b/fragments/consent_manager_box_cssjs.php index 97db736..cd8aed7 100644 --- a/fragments/consent_manager_box_cssjs.php +++ b/fragments/consent_manager_box_cssjs.php @@ -29,7 +29,7 @@ $_params['consent_manager_outputjs'] = true; $_params['clang'] = rex_clang::getCurrentId(); $_params['v'] = filemtime($addon->getAssetsPath('consent_manager_frontend.js')) . rex_clang::getCurrentId(); -$output .= ' '; +$output .= ' '; $_SESSION['consent_manager']['cachelogid'] = $consent_manager->cacheLogId; $_SESSION['consent_manager']['outputcssjs'] = $output; From 9f1657c36d039569dead0c3afcc6a2585b0739f4 Mon Sep 17 00:00:00 2001 From: IngoWinter Date: Sun, 14 Mar 2021 21:12:45 +0100 Subject: [PATCH 2/2] defer statt async --- fragments/consent_manager_box_cssjs.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fragments/consent_manager_box_cssjs.php b/fragments/consent_manager_box_cssjs.php index cd8aed7..0179928 100644 --- a/fragments/consent_manager_box_cssjs.php +++ b/fragments/consent_manager_box_cssjs.php @@ -29,7 +29,7 @@ $_params['consent_manager_outputjs'] = true; $_params['clang'] = rex_clang::getCurrentId(); $_params['v'] = filemtime($addon->getAssetsPath('consent_manager_frontend.js')) . rex_clang::getCurrentId(); -$output .= ' '; +$output .= ' '; $_SESSION['consent_manager']['cachelogid'] = $consent_manager->cacheLogId; $_SESSION['consent_manager']['outputcssjs'] = $output;