add opt-in and status change listener
This commit is contained in:
parent
702cfab6bc
commit
b03e7374a5
@ -1,5 +1,12 @@
|
|||||||
|
var cookiesEnabled = false;
|
||||||
|
|
||||||
window.addEventListener("load", function() {
|
window.addEventListener("load", function() {
|
||||||
window.cookieconsent.initialise({
|
window.cookieconsent.initialise({
|
||||||
|
"type": "opt-in",
|
||||||
|
"position": "bottom-right",
|
||||||
|
content: {
|
||||||
|
message: 'Please allow cookies to enable all features of this website.'
|
||||||
|
},
|
||||||
"palette": {
|
"palette": {
|
||||||
"popup": {
|
"popup": {
|
||||||
"background": "#242943ff"
|
"background": "#242943ff"
|
||||||
@ -7,6 +14,15 @@ window.addEventListener("load", function() {
|
|||||||
"button": {
|
"button": {
|
||||||
"background": "#ffd500ff"
|
"background": "#ffd500ff"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
onStatusChange: function(status, chosenBefore) {
|
||||||
|
// Allow cookies
|
||||||
|
if (status == 'allow') {
|
||||||
|
cookiesEnabled = true;
|
||||||
|
// Disable cookies
|
||||||
|
} else {
|
||||||
|
cookiesEnabled = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user