Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frontend JS nicht blockend laden #147

Merged
merged 2 commits into from
Mar 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions assets/consent_manager_frontend.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* globals Cookies, consent_managerIEVersion */
document.addEventListener('DOMContentLoaded', function () {
(function () {
'use strict';
var expires = new Date(),
show = 0,
Expand Down Expand Up @@ -188,4 +188,4 @@ document.addEventListener('DOMContentLoaded', function () {
document.getElementById('consent_manager-background').classList.remove('consent_manager-hidden');
}

});
})();
2 changes: 1 addition & 1 deletion fragments/consent_manager_box_cssjs.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 .= ' <script src="' . rex_url::frontendController($_params) . '" id="consent_manager_script"></script>';
$output .= ' <script src="' . rex_url::frontendController($_params) . '" id="consent_manager_script" defer></script>';

$_SESSION['consent_manager']['cachelogid'] = $consent_manager->cacheLogId;
$_SESSION['consent_manager']['outputcssjs'] = $output;
Expand Down