sumorobot-web/assets/js/cookie.js

29 lines
768 B
JavaScript
Raw Normal View History

2018-07-08 18:50:42 +00:00
var cookiesEnabled = false;
2018-01-28 09:36:50 +00:00
window.addEventListener("load", function() {
window.cookieconsent.initialise({
2018-07-08 18:50:42 +00:00
"type": "opt-in",
"position": "bottom-right",
content: {
message: 'Please allow cookies to enable all features of this website.'
},
2018-01-28 09:36:50 +00:00
"palette": {
"popup": {
"background": "#242943ff"
},
"button": {
"background": "#ffd500ff"
}
2018-07-08 18:50:42 +00:00
},
onStatusChange: function(status, chosenBefore) {
// Allow cookies
if (status == 'allow') {
cookiesEnabled = true;
// Disable cookies
} else {
cookiesEnabled = false
}
2018-01-28 09:36:50 +00:00
}
})
});