fixed lint
This commit is contained in:
parent
6ee2df5adc
commit
eda901ba4a
|
@ -66,10 +66,6 @@ class FileSender extends EventEmitter {
|
|||
window.crypto.subtle.exportKey('jwk', secretKey)
|
||||
]);
|
||||
})
|
||||
.catch(err => {
|
||||
Raven.captureException(err);
|
||||
return Promise.reject(err);
|
||||
})
|
||||
.then(([encrypted, keydata]) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
const file = this.file;
|
||||
|
|
|
@ -2,8 +2,6 @@ const FileSender = require('./fileSender');
|
|||
const { notify } = require('./utils');
|
||||
const $ = require('jquery');
|
||||
|
||||
const Raven = window.Raven;
|
||||
|
||||
$(document).ready(function() {
|
||||
// reset copy button
|
||||
const $copyBtn = $('#copy-btn');
|
||||
|
@ -16,13 +14,13 @@ $(document).ready(function() {
|
|||
$('#share-link').hide();
|
||||
|
||||
for (let i = 0; i < localStorage.length; i++) {
|
||||
let id = localStorage.key(i);
|
||||
const id = localStorage.key(i);
|
||||
populateFileList(localStorage.getItem(id));
|
||||
}
|
||||
|
||||
// copy link to clipboard
|
||||
$copyBtn.click(() => {
|
||||
var aux = document.createElement('input');
|
||||
const aux = document.createElement('input');
|
||||
aux.setAttribute('value', $('#link').attr('value'));
|
||||
document.body.appendChild(aux);
|
||||
aux.select();
|
||||
|
@ -87,6 +85,7 @@ $(document).ready(function() {
|
|||
$('#share-link').show();
|
||||
|
||||
populateFileList(JSON.stringify(fileData));
|
||||
notify('Your upload has finished.');
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -96,9 +95,11 @@ $(document).ready(function() {
|
|||
|
||||
//update file table with current files in localStorage
|
||||
function populateFileList(file) {
|
||||
try {
|
||||
file = JSON.parse(file);
|
||||
}
|
||||
catch (e) { return }
|
||||
|
||||
const $fileList = $('#uploaded-files');
|
||||
const row = document.createElement('tr');
|
||||
const name = document.createElement('td');
|
||||
const link = document.createElement('td');
|
||||
|
@ -109,7 +110,6 @@ $(document).ready(function() {
|
|||
const popupDiv = document.createElement('div');
|
||||
const $popupText = $('<span>', { class: 'popuptext' });
|
||||
const cellText = document.createTextNode(file.name);
|
||||
const progress = document.createElement('p');
|
||||
|
||||
name.appendChild(cellText);
|
||||
|
||||
|
|
|
@ -198,9 +198,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"aws-sdk": {
|
||||
"version": "2.76.0",
|
||||
"resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.76.0.tgz",
|
||||
"integrity": "sha1-LDe/BON6tKJrX/fHWD1ZYDTHYwk="
|
||||
"version": "2.77.0",
|
||||
"resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.77.0.tgz",
|
||||
"integrity": "sha1-gJCQu4dNj0//ysUxZilYdjjnhlw="
|
||||
},
|
||||
"babel-code-frame": {
|
||||
"version": "6.22.0",
|
||||
|
|
Loading…
Reference in New Issue