fixed lint

This commit is contained in:
Danny Coates 2017-06-23 17:05:41 -07:00
parent 6ee2df5adc
commit eda901ba4a
No known key found for this signature in database
GPG key ID: 4C442633C62E00CB
3 changed files with 10 additions and 14 deletions

View file

@ -66,10 +66,6 @@ class FileSender extends EventEmitter {
window.crypto.subtle.exportKey('jwk', secretKey) window.crypto.subtle.exportKey('jwk', secretKey)
]); ]);
}) })
.catch(err => {
Raven.captureException(err);
return Promise.reject(err);
})
.then(([encrypted, keydata]) => { .then(([encrypted, keydata]) => {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const file = this.file; const file = this.file;

View file

@ -2,8 +2,6 @@ const FileSender = require('./fileSender');
const { notify } = require('./utils'); const { notify } = require('./utils');
const $ = require('jquery'); const $ = require('jquery');
const Raven = window.Raven;
$(document).ready(function() { $(document).ready(function() {
// reset copy button // reset copy button
const $copyBtn = $('#copy-btn'); const $copyBtn = $('#copy-btn');
@ -16,13 +14,13 @@ $(document).ready(function() {
$('#share-link').hide(); $('#share-link').hide();
for (let i = 0; i < localStorage.length; i++) { for (let i = 0; i < localStorage.length; i++) {
let id = localStorage.key(i); const id = localStorage.key(i);
populateFileList(localStorage.getItem(id)); populateFileList(localStorage.getItem(id));
} }
// copy link to clipboard // copy link to clipboard
$copyBtn.click(() => { $copyBtn.click(() => {
var aux = document.createElement('input'); const aux = document.createElement('input');
aux.setAttribute('value', $('#link').attr('value')); aux.setAttribute('value', $('#link').attr('value'));
document.body.appendChild(aux); document.body.appendChild(aux);
aux.select(); aux.select();
@ -87,6 +85,7 @@ $(document).ready(function() {
$('#share-link').show(); $('#share-link').show();
populateFileList(JSON.stringify(fileData)); populateFileList(JSON.stringify(fileData));
notify('Your upload has finished.');
}); });
}; };
@ -96,9 +95,11 @@ $(document).ready(function() {
//update file table with current files in localStorage //update file table with current files in localStorage
function populateFileList(file) { function populateFileList(file) {
try {
file = JSON.parse(file); file = JSON.parse(file);
}
catch (e) { return }
const $fileList = $('#uploaded-files');
const row = document.createElement('tr'); const row = document.createElement('tr');
const name = document.createElement('td'); const name = document.createElement('td');
const link = document.createElement('td'); const link = document.createElement('td');
@ -109,7 +110,6 @@ $(document).ready(function() {
const popupDiv = document.createElement('div'); const popupDiv = document.createElement('div');
const $popupText = $('<span>', { class: 'popuptext' }); const $popupText = $('<span>', { class: 'popuptext' });
const cellText = document.createTextNode(file.name); const cellText = document.createTextNode(file.name);
const progress = document.createElement('p');
name.appendChild(cellText); name.appendChild(cellText);

6
package-lock.json generated
View file

@ -198,9 +198,9 @@
"dev": true "dev": true
}, },
"aws-sdk": { "aws-sdk": {
"version": "2.76.0", "version": "2.77.0",
"resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.76.0.tgz", "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.77.0.tgz",
"integrity": "sha1-LDe/BON6tKJrX/fHWD1ZYDTHYwk=" "integrity": "sha1-gJCQu4dNj0//ysUxZilYdjjnhlw="
}, },
"babel-code-frame": { "babel-code-frame": {
"version": "6.22.0", "version": "6.22.0",