Improve the LessLoader check to hopefully stop the message saying cookies were blocked.

pull/1/head
Caleb James DeLisle 7 years ago
parent 72f03b2a47
commit f418ee9632

@ -9,18 +9,20 @@ define([
var module = { exports: {} };
var key = Config.requireConf.urlArgs;
var localStorage = {};
try {
localStorage = window.localStorage || {};
if (localStorage['LESS_CACHE'] !== key) {
Object.keys(localStorage).forEach(function (k) {
if (k.indexOf('LESS_CACHE|') !== 0) { return; }
delete localStorage[k];
});
localStorage['LESS_CACHE'] = key;
if (!window.cryptpadCache) {
try {
localStorage = window.localStorage || {};
if (localStorage['LESS_CACHE'] !== key) {
Object.keys(localStorage).forEach(function (k) {
if (k.indexOf('LESS_CACHE|') !== 0) { return; }
delete localStorage[k];
});
localStorage['LESS_CACHE'] = key;
}
} catch (e) {
console.error(e);
localStorage = {};
}
} catch (e) {
console.error(e);
localStorage = {};
}
var cacheGet = function (k, cb) {

Loading…
Cancel
Save