Skip to content
This repository was archived by the owner on Jan 19, 2025. It is now read-only.

Commit 0548722

Browse files
committed
Prepare for gatsbyjs 🚀
1 parent 25b53b5 commit 0548722

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

_ts/common/cookie-consent.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,30 @@ var cookieConsent = function () {
2323
});
2424
};
2525
exports.cookieConsent = cookieConsent;
26+
27+
28+
if (typeof window !== "undefined") {
29+
window.addEventListener('load', () => {
30+
window.cookieconsent.initialise({
31+
palette: {
32+
popup: {
33+
background: '#303F9F',
34+
text: '#ffffff'
35+
},
36+
button: {
37+
background: '#0F67FF',
38+
text: '#ffffff'
39+
}
40+
},
41+
theme: 'classic',
42+
content: {
43+
dismiss: 'Ok',
44+
href: window.location.protocol + '//' + window.location.host + '/cookie-policy.html',
45+
message: 'This website uses cookies to ensure you get the best experience.',
46+
link: 'Learn more about cookie policy'
47+
}
48+
});
49+
});
50+
} else {
51+
console.log("no cookieconsent");
52+
}

0 commit comments

Comments
 (0)