mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-06 20:41:17 +01:00
add body class when cookie consent warning is open
This commit is contained in:
@@ -692,6 +692,7 @@ app.cacheBuster = null;
|
||||
|
||||
app.parseAndTranslate('partials/cookie-consent', config.cookies, function (html) {
|
||||
$(document.body).append(html);
|
||||
$(document.body).addClass('cookie-consent-open');
|
||||
|
||||
var warningEl = $('.cookie-consent');
|
||||
var dismissEl = warningEl.find('button');
|
||||
@@ -699,6 +700,7 @@ app.cacheBuster = null;
|
||||
// Save consent cookie and remove warning element
|
||||
storage.setItem('cookieconsent', '1');
|
||||
warningEl.remove();
|
||||
$(document.body).removeClass('cookie-consent-open');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user