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