Skip to content

Commit

Permalink
Prevent download button from being clicked multiple times
Browse files Browse the repository at this point in the history
pdehaan committed Aug 4, 2017

Verified

This commit was signed with the committer’s verified signature. The key has expired.
pdehaan Peter deHaan
1 parent 80db158 commit 2f9372e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions frontend/src/download.js
Original file line number Diff line number Diff line change
@@ -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();

0 comments on commit 2f9372e

Please sign in to comment.