lint compliance

This commit is contained in:
yflory 2023-02-01 11:56:13 +01:00 committed by Wolfgang Ginolas
parent f28e4cfdb1
commit 5e6b042f28
5 changed files with 9 additions and 13 deletions

View File

@ -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);
}

View File

@ -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

View File

@ -2071,7 +2071,7 @@ define([
onReady: function () {
ready = true;
},
onError: function (err) {
onError: function () {
if (!cfg.integration) { return; }
var reload = function () {

View File

@ -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);

View File

@ -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) {