diff --git a/frontend/src/upload.js b/frontend/src/upload.js index a65cde85..022c922e 100644 --- a/frontend/src/upload.js +++ b/frontend/src/upload.js @@ -180,10 +180,6 @@ $(document).ready(function() { const fileSender = new FileSender(file); $('#cancel-upload').click(() => { fileSender.cancel(); - location.reload(); - document.l10n.formatValue('uploadCancelNotification').then(str => { - notify(str); - }); storage.referrer = 'cancelled-upload'; // record upload-stopped (cancelled) by sender @@ -195,6 +191,7 @@ $(document).ready(function() { cd1: event.type === 'drop' ? 'drop' : 'click', cd2: 'cancelled' }); + location.reload(); }); fileSender.on('progress', progress => { diff --git a/frontend/src/utils.js b/frontend/src/utils.js index d338b7c9..d9222718 100644 --- a/frontend/src/utils.js +++ b/frontend/src/utils.js @@ -20,6 +20,8 @@ function hexToArray(str) { } function notify(str) { + return str; + /* TODO: enable once we have an opt-in ui element if (!('Notification' in window)) { return; } else if (Notification.permission === 'granted') { @@ -29,6 +31,7 @@ function notify(str) { if (permission === 'granted') new Notification(str); }); } + */ } function gcmCompliant() {