lint compliance

This commit is contained in:
yflory 2021-01-19 15:14:19 +01:00
parent 720938d22c
commit 03e690b0bc
3 changed files with 5 additions and 6 deletions

View file

@ -990,7 +990,6 @@ define([
};
window.addEventListener('storage', function (e) {
if (e.key !== 'CRYPTPAD_STORE|disableCache') { return; }
var o = e.oldValue;
var n = e.newValue;
if (n) {
Cache.disable();

View file

@ -2943,10 +2943,10 @@ define([
var inactiveTime = (+new Date()) - CACHE_MAX_AGE * (24 * 3600 * 1000);
Cache.getKeys(function (err, keys) {
if (err) { return void console.error(err); }
var next = function (cb) {
var next = function () {
if (!keys.length) { return; }
var key = keys.pop();
var value = Cache.getTime(key, function (err, atime) {
Cache.getTime(key, function (err, atime) {
if (err) { return void next(); }
if (!atime || atime < inactiveTime) {
Cache.clearChannel(key, next());

View file

@ -365,7 +365,7 @@ define([
Messages.settings_cacheHint = "CryptPad stores parts of your documents in your browser's memory in order to save network usage and improve loading times. The documents stored in cache can then be loaded faster the next time you visit them. You can disable the cache if your device doesn't have a lot of free storage space. For security reasons, the cache is always cleared when you log out, but you can clear it manually if you want to reclaim storage space on your machine.";
Messages.settings_cacheCheckbox = "Enable cache on this device";
Messages.settings_cacheButton = "Clear existing cache";
makeBlock('cache', function (cb, $div) {
makeBlock('cache', function (cb) {
var store = window.cryptpadStore;
var $cbox = $(UI.createCheckbox('cp-settings-cache',
@ -401,9 +401,9 @@ define([
UI.confirmButton(button, {
classes: 'btn-danger'
}, function () {
spinner.spin();
spinner2.spin();
sframeChan.query('Q_CLEAR_CACHE', null, function() {
spinner.done();
spinner2.done();
});
});