Skip to content

Commit

Permalink
Update index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
lilkidsuave authored Jun 24, 2024
1 parent b91a5d7 commit 3d0d062
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ <h4>Downloading...</h4>
</div>
<p id="status-text">Starting download...</p>
</div>

<script>
$('#downloadForm').submit(function(e) {
e.preventDefault();
Expand All @@ -67,6 +67,14 @@ <h4>Downloading...</h4>
if (data.status === 'completed') {
$('#progress-bar').css('width', '100%');
$('#status-text').text('Download Completed!');

// Hide progress container and reset form after 1 second
setTimeout(function() {
$('#progress-container').hide();
$('#downloadForm')[0].reset();
$('#progress-bar').css('width', '0%');
$('#status-text').text('Starting download...');
}, 1000);
}
},
error: function(jqXHR, textStatus, errorThrown) {
Expand Down

0 comments on commit 3d0d062

Please sign in to comment.