From 5e6b042f28c428d10c887fcda1b11fb909deefb4 Mon Sep 17 00:00:00 2001 From: yflory Date: Wed, 1 Feb 2023 11:56:13 +0100 Subject: [PATCH] lint compliance --- www/common/outer/integration.js | 2 -- www/common/sframe-common-integration.js | 3 ++- www/common/sframe-common-outer.js | 2 +- www/cryptpad-api.js | 8 ++++---- www/integration/main.js | 7 ++----- 5 files changed, 9 insertions(+), 13 deletions(-) diff --git a/www/common/outer/integration.js b/www/common/outer/integration.js index 7dc1c7768..b981316b3 100644 --- a/www/common/outer/integration.js +++ b/www/common/outer/integration.js @@ -17,7 +17,6 @@ define([ }; var sendMsg = function (ctx, data, client, cb) { - console.error(data, client) var c = ctx.clients[client]; if (!c) { return void cb({error: 'NO_CLIENT'}); } var chan = ctx.channels[c.channel]; @@ -37,7 +36,6 @@ define([ var initIntegration = function (ctx, obj, client, cb) { var channel = obj.channel; var secret = obj.secret; - console.error('INIT INTE', channel, secret.channel); if (secret.keys.cryptKey) { secret.keys.cryptKey = convertToUint8(secret.keys.cryptKey); } diff --git a/www/common/sframe-common-integration.js b/www/common/sframe-common-integration.js index 49da40004..583bde78d 100644 --- a/www/common/sframe-common-integration.js +++ b/www/common/sframe-common-integration.js @@ -16,6 +16,7 @@ define([ var debug = console.warn; //debug = function () {}; + var execCommand = function () {}; // placeholder toolbar = toolbar; // XXX Use custom "spinner" in toolbar to show what's saved in Nextcloud @@ -127,7 +128,7 @@ define([ var module = Common.makeUniversal('integration', { onEvent: onEvent }); - var execCommand = module.execCommand; + execCommand = module.execCommand; // Request a save lock. // Callback with "true" if allowed to save or "false" if someone else diff --git a/www/common/sframe-common-outer.js b/www/common/sframe-common-outer.js index e2d3644fd..cb3465392 100644 --- a/www/common/sframe-common-outer.js +++ b/www/common/sframe-common-outer.js @@ -2071,7 +2071,7 @@ define([ onReady: function () { ready = true; }, - onError: function (err) { + onError: function () { if (!cfg.integration) { return; } var reload = function () { diff --git a/www/cryptpad-api.js b/www/cryptpad-api.js index 6292a58e5..97907894e 100644 --- a/www/cryptpad-api.js +++ b/www/cryptpad-api.js @@ -69,7 +69,7 @@ }; }; - var makeIframe = function () {} // placeholder + var makeIframe = function () {}; // placeholder var start = function (config, chan) { return new Promise(function (resolve, reject) { @@ -81,8 +81,8 @@ var xhr = new XMLHttpRequest(); xhr.open('GET', config.document.url, true); xhr.responseType = 'blob'; - xhr.onload = function(e) { - if (this.status == 200) { + xhr.onload = function () { + if (this.status === 200) { var blob = this.response; // myBlob is now the blob that the object URL pointed to. cb(null, blob); @@ -153,7 +153,7 @@ blob = data; config.events.onSave(data, cb); }); - chan.on('RELOAD', function (data) { + chan.on('RELOAD', function () { config.document.blob = blob; document.getElementById('cryptpad-editor').remove(); makeIframe(config); diff --git a/www/integration/main.js b/www/integration/main.js index 41374762e..ff4e8ba18 100644 --- a/www/integration/main.js +++ b/www/integration/main.js @@ -1,9 +1,7 @@ define([ '/common/sframe-common-outer.js', '/common/common-hash.js', - '/common/cryptget.js', - '/bower_components/nthen/index.js', -], function (SCO, Hash, Crypt, nThen) { +], function (SCO, Hash) { var getTxid = function () { return Math.random().toString(16).replace('0.', ''); @@ -116,9 +114,8 @@ define([ cb(); }); }; - var reload = function (data, cb) { + var reload = function (data) { chan.send('RELOAD', data); - console.error(data); }; chan.on('START', function (data) {