Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/uPagge/uBlogger.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDillon <dillonzq@outlook.com>2020-05-13 16:19:39 +0300
committerGitHub <noreply@github.com>2020-05-13 16:19:39 +0300
commit0a9ec9745073527c2d43c545ef8d228fb22a16fa (patch)
tree8572ef783e39c44d35737a4b5fa7b38bf8769c1a /src
parent8d491509e02ff1a4a50f1a1b70e79e94c48bb2f6 (diff)
feat(cookies): add Cookie consent banner (#355)
Diffstat (limited to 'src')
-rw-r--r--src/js/theme.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/js/theme.js b/src/js/theme.js
index 0d44938..2c0b543 100644
--- a/src/js/theme.js
+++ b/src/js/theme.js
@@ -626,6 +626,10 @@ class Theme {
if (SmoothScroll) new SmoothScroll('[href^="#"]', { speed: 300, speedAsDuration: true, header: '#header-desktop' });
}
+ initCookieconsent() {
+ if (this.config.cookieconsent) cookieconsent.initialise(this.config.cookieconsent);
+ }
+
onScroll() {
const $headers = [];
if (document.body.getAttribute('header-desktop') === 'auto') $headers.push(document.getElementById('header-desktop'));
@@ -706,6 +710,7 @@ class Theme {
this.initEcharts();
this.initTypeit();
this.initMapbox();
+ this.initCookieconsent();
this.onScroll();
this.onResize();