mirror of
https://github.com/pretix/pretix.git
synced 2026-05-08 15:44:02 +00:00
Cookie consent: Fail softly if localStorage is unavailable
This commit is contained in:
@@ -20,6 +20,13 @@ $(function () {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!window.localStorage) {
|
||||||
|
// Consent not supported. Even IE8 supports it, so we're on a weird embedded device.
|
||||||
|
// Let's just say we don't consent then.
|
||||||
|
update_consent({})
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var storage_val = window.localStorage[storage_key];
|
var storage_val = window.localStorage[storage_key];
|
||||||
var show_dialog = !storage_val;
|
var show_dialog = !storage_val;
|
||||||
var consent_checkboxes = $("#cookie-consent-details input[type=checkbox][name]");
|
var consent_checkboxes = $("#cookie-consent-details input[type=checkbox][name]");
|
||||||
|
|||||||
Reference in New Issue
Block a user