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