From dd0ab710de86f4d93e0c75b0ef5f5e5d73f2bda9 Mon Sep 17 00:00:00 2001 From: Danny Coates Date: Tue, 25 Jul 2017 12:08:37 -0700 Subject: [PATCH] format --- frontend/src/fileReceiver.js | 4 +--- frontend/src/upload.js | 4 ++-- public/main.css | 3 ++- server/server.js | 21 +++++++++------------ 4 files changed, 14 insertions(+), 18 deletions(-) diff --git a/frontend/src/fileReceiver.js b/frontend/src/fileReceiver.js index d0854e1c..209a9ecd 100644 --- a/frontend/src/fileReceiver.js +++ b/frontend/src/fileReceiver.js @@ -19,9 +19,7 @@ class FileReceiver extends EventEmitter { xhr.onload = function(event) { if (xhr.status === 404) { - reject( - new Error('notfound') - ); + reject(new Error('notfound')); return; } diff --git a/frontend/src/upload.js b/frontend/src/upload.js index 84279760..a65cde85 100644 --- a/frontend/src/upload.js +++ b/frontend/src/upload.js @@ -135,7 +135,7 @@ $(document).ready(function() { event.preventDefault(); // don't allow upload if not on upload page - if ($('#page-one').attr('hidden')){ + if ($('#page-one').attr('hidden')) { return; } @@ -472,7 +472,7 @@ $(document).ready(function() { const $popupNvmSpan = $('', { class: 'popup-no' }); $popupNvmSpan.attr('data-l10n-id', 'deletePopupCancel'); - $popupText.html([$popupMessage, $popupDelSpan, $popupNvmSpan]); + $popupText.html([$popupMessage, $popupDelSpan, $popupNvmSpan]); // add data cells to table row row.appendChild(name); diff --git a/public/main.css b/public/main.css index ef074d8a..c04950a6 100644 --- a/public/main.css +++ b/public/main.css @@ -1,7 +1,8 @@ /*** index.html ***/ html { background: url('resources/send_bg.svg'); - font-family: -apple-system, + font-family: + -apple-system, BlinkMacSystemFont, 'SF Pro Text', Helvetica, diff --git a/server/server.js b/server/server.js index e6903d8c..49fbe7e0 100644 --- a/server/server.js +++ b/server/server.js @@ -47,10 +47,7 @@ app.use( 'https://sentry.prod.mozaws.net', 'https://www.google-analytics.com' ], - imgSrc: [ - "'self'", - 'https://www.google-analytics.com' - ], + imgSrc: ["'self'", 'https://www.google-analytics.com'], scriptSrc: ["'self'"], styleSrc: ["'self'", 'https://code.cdn.mozilla.net'], fontSrc: ["'self'", 'https://code.cdn.mozilla.net'], @@ -116,10 +113,10 @@ app.get('/download/:id', (req, res) => { return; } - storage.filename(id).then(filename => { - return storage - .length(id) - .then(contentLength => { + storage + .filename(id) + .then(filename => { + return storage.length(id).then(contentLength => { storage.ttl(id).then(timeToExpiry => { res.render('download', { filename: decodeURIComponent(filename), @@ -129,10 +126,10 @@ app.get('/download/:id', (req, res) => { }); }); }); - }) - .catch(() => { - res.status(404).render('notfound'); - });; + }) + .catch(() => { + res.status(404).render('notfound'); + }); }); app.get('/assets/download/:id', (req, res) => {