Prevent download button from being clicked multiple times

This commit is contained in:
Peter deHaan 2017-08-04 10:17:15 -07:00
parent 80db158ee3
commit 2f9372e8e0
No known key found for this signature in database
GPG key ID: F0FC6C01C6305097

View file

@ -42,6 +42,9 @@ $(document).ready(function() {
});
$('#download-btn').click(download);
function download() {
// Disable the download button to avoid accidental double clicks.
$('#download-btn').attr('disabled', 'disabled');
storage.totalDownloads += 1;
const fileReceiver = new FileReceiver();