Skip to content

Commit

Permalink
Merge pull request #29 from peckadesign/0-cookieConsent-zobecneni
Browse files Browse the repository at this point in the history
Použití obecnější class a CSS proměnných pro cookie consent
  • Loading branch information
zipper authored Jan 14, 2022
2 parents 3f8eae9 + 0189035 commit 74f6561
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions extensions/pd/cookieConsent.ajax.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@
script.remove();
},
closeCookieConsent: function (settings) {
var $modal = settings.nette.form.closest('.js-cookie-modal');
var closingDuration = parseInt(getComputedStyle(document.documentElement).getPropertyValue('--pdbox-closing-duration') || 0);
var $consentEl = settings.nette.form.closest('.js-cookie-consent');
var closingDuration = parseInt(getComputedStyle(document.documentElement).getPropertyValue('--cookie-consent-closing-duration') || 0);

$modal.addClass('cookie-modal--close');
$consentEl.addClass('js-cookie-consent--close');

setTimeout(function() {
$modal.remove();
$consentEl.remove();
}, closingDuration);
}
});
Expand Down

0 comments on commit 74f6561

Please sign in to comment.