cookie_consent
cookie_consent copied to clipboard
Optionen funktionieren nicht
Wenn ich versuche eigene Optionen anzugeben bekomme ich den Fehler:
Die gegebenen Optionen liegen nicht im gültigen JSON-Format vor
Mein Versuch sieht so aus:
{
onInitialise: function(status)
{
//do stuff
}
}
Ist das Format falsch?
Das klingt auf Anhieb nach einer älteren Version. Welche hast du installiert?
Es ist die 2.1.0
, hatte die 3.0 betas erst mal außen vor gelassen.
onInitialise: function (status) {
var type = this.options.type;
var didConsent = this.hasConsented();
if (type == 'opt-in' && didConsent) {
alert(didConsent);
}
if (type == 'opt-out' && !didConsent) {
alert(didConsent);
}
}
die äußeren Klammern weglassen!