From 9c1eaf9c1a51a3657bdfdefb5ecf26e10a0b6e07 Mon Sep 17 00:00:00 2001 From: ansuz Date: Tue, 4 Jul 2017 15:48:20 +0200 Subject: [PATCH] lint compliance --- www/common/cryptpad-common.js | 22 ++++++---------------- www/slide/main.js | 1 + 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index 81175b5fe..949865052 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -895,7 +895,6 @@ define([ var $container = $('', {'class':'limit-container'}); var todo; var updateUsage = window.updateUsage = common.notAgainForAnother(function () { - console.log("updating usage bar"); common.getPinnedUsage(todo); }, LIMIT_REFRESH_RATE); @@ -965,21 +964,12 @@ define([ }; setInterval(function () { - var t = updateUsage(); - if (t) { - console.log("usage already updated. eligible for refresh in %sms", t); - } + updateUsage(); }, LIMIT_REFRESH_RATE * 3); updateUsage(); getProxy().on('change', ['drive'], function () { - var t = updateUsage(); - if (t) { - console.log("usage bar update throttled due to overuse." + - " Eligible for update in %sms", t); - } else { - console.log("usage bar updated"); - } + updateUsage(); }); cb(null, $container); }; @@ -1233,18 +1223,18 @@ define([ } if (decrypted.blob) { - size = decrypted.blob.size + size = decrypted.blob.size; } - var sizeMb = Cryptpad.bytesToMegabytes(size); + var sizeMb = common.bytesToMegabytes(size); var $btn = $(root).find('button'); $btn.addClass('btn btn-success') .attr('type', 'download') - .html(function (i, html) { + .html(function () { var text = Messages.download_mt_button + '
'; if (title) { - text += '' + Cryptpad.fixHTML(title) + '
'; + text += '' + common.fixHTML(title) + '
'; } if (size) { text += '' + Messages._getKey('formattedMB', [sizeMb]) + ''; diff --git a/www/slide/main.js b/www/slide/main.js index 7c2b6d0b4..e14b194c5 100644 --- a/www/slide/main.js +++ b/www/slide/main.js @@ -470,6 +470,7 @@ define([ }).append($('', {'class': 'drawer'}).text(Messages.printText)); // TODO reenable this when it is working again + $printButton = $printButton; //$drawer.append($printButton); var $slideOptions = $('