add cookie status on initialise listener

This commit is contained in:
Silver Kuusik 2018-07-08 21:00:54 +02:00 committed by GitHub
parent 58fcaa8245
commit 3775bf1e99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 3 deletions

View File

@ -15,11 +15,17 @@ window.addEventListener("load", function() {
"background": "#ffd500ff"
}
},
onStatusChange: function(status, chosenBefore) {
// Allow cookies
onInitialise: function (status) {
// When cookies are allowed
if (status == 'allow') {
cookiesEnabled = true;
// Disable cookies
}
},
onStatusChange: function(status, chosenBefore) {
// When cookies are allowed
if (status == 'allow') {
cookiesEnabled = true;
// When cookies are disabled
} else {
cookiesEnabled = false
}