From bb13165e865f665d114e86b1f7ec481e4fbc7055 Mon Sep 17 00:00:00 2001 From: yflory Date: Wed, 4 Nov 2020 18:20:57 +0100 Subject: [PATCH] lint compliance --- customize.dist/loading.js | 12 ++++++------ www/common/outer/async-store.js | 4 ++-- www/common/outer/sharedfolder.js | 4 ++-- www/common/sframe-app-framework.js | 3 +-- www/common/sframe-chainpad-netflux-inner.js | 4 ++-- 5 files changed, 13 insertions(+), 14 deletions(-) diff --git a/customize.dist/loading.js b/customize.dist/loading.js index 85a4a0b7e..344c61942 100644 --- a/customize.dist/loading.js +++ b/customize.dist/loading.js @@ -317,12 +317,12 @@ button.primary:hover{ var c = types.indexOf(data.type); if (c < current) { return console.error(data); } try { - var a = document.querySelector('.cp-loading-spinner-container'); - if (a) { a.style.display = 'none'; } - var b = document.querySelector('.cp-loading-progress-list'); - if (b) { b.innerHTML = makeList(data); } - var c = document.querySelector('.cp-loading-progress-container'); - if (c) { c.innerHTML = makeBar(data); } + var el1 = document.querySelector('.cp-loading-spinner-container'); + if (el1) { el1.style.display = 'none'; } + var el2 = document.querySelector('.cp-loading-progress-list'); + if (el2) { el2.innerHTML = makeList(data); } + var el3 = document.querySelector('.cp-loading-progress-container'); + if (el3) { el3.innerHTML = makeBar(data); } } catch (e) { console.error(e); } }; window.CryptPad_updateLoadingProgress = updateLoadingProgress; diff --git a/www/common/outer/async-store.js b/www/common/outer/async-store.js index 89ed1dbbf..a2101a7ff 100644 --- a/www/common/outer/async-store.js +++ b/www/common/outer/async-store.js @@ -1598,7 +1598,7 @@ define([ onCacheStart: function () { postMessage(clientId, "PAD_CACHE"); }, - onCacheReady: function (info) { + onCacheReady: function () { postMessage(clientId, "PAD_CACHE_READY"); }, onReady: function (pad) { @@ -2500,7 +2500,7 @@ define([ addSharedFolderHandler(); userObject.migrate(cb); }; - var onReady = function (clientId, returned, cb) { + var onReady = function (clientId, returned/*, cb*/) { console.error('READY'); var proxy = store.proxy; /* diff --git a/www/common/outer/sharedfolder.js b/www/common/outer/sharedfolder.js index 830bef05b..3b0407bf3 100644 --- a/www/common/outer/sharedfolder.js +++ b/www/common/outer/sharedfolder.js @@ -182,7 +182,7 @@ define([ } }; var rt = sf.rt = Listmap.create(listmapConfig); - rt.proxy.on('cacheready', function (info) { + rt.proxy.on('cacheready', function () { if (isNew && !Object.keys(rt.proxy).length) { // New Shared folder: no migration required rt.proxy.version = 2; @@ -202,7 +202,7 @@ define([ }); sf.ready = true; }); - rt.proxy.on('ready', function (info) { + rt.proxy.on('ready', function () { if (isNew && !Object.keys(rt.proxy).length) { // New Shared folder: no migration required rt.proxy.version = 2; diff --git a/www/common/sframe-app-framework.js b/www/common/sframe-app-framework.js index 81ab18d45..24f07e48e 100644 --- a/www/common/sframe-app-framework.js +++ b/www/common/sframe-app-framework.js @@ -486,7 +486,6 @@ console.log(newContentStr); var newContent = JSON.parse(newContentStr); var metadata = extractMetadata(newContent); -console.log('OKOK'); // Make sure we're using the correct app for this cache if (metadata && typeof(metadata.type) !== 'undefined' && metadata.type !== type) { @@ -497,7 +496,7 @@ console.log('OKOK'); cpNfInner.metadataMgr.updateMetadata(metadata); newContent = normalize(newContent); if (!unsyncMode) { - contentUpdate(newContent, function () { return function () {}}); + contentUpdate(newContent, function () { return function () {}; }); } UI.removeLoadingScreen(emitResize); diff --git a/www/common/sframe-chainpad-netflux-inner.js b/www/common/sframe-chainpad-netflux-inner.js index 57689b7ea..08625dc77 100644 --- a/www/common/sframe-chainpad-netflux-inner.js +++ b/www/common/sframe-chainpad-netflux-inner.js @@ -94,10 +94,10 @@ define([ evInfiniteSpinner.fire(); }, 2000); - sframeChan.on('EV_RT_CACHE', function (isPermanent) { + sframeChan.on('EV_RT_CACHE', function () { // XXX }); - sframeChan.on('EV_RT_CACHE_READY', function (isPermanent) { + sframeChan.on('EV_RT_CACHE_READY', function () { // XXX onCacheReady({realtime: chainpad}); console.error('PEWPEWPEW');