mirror of
https://github.com/publiclab/image-sequencer.git
synced 2025-12-10 10:20:00 +01:00
Update defaultHtmlStepUi.js (#1388)
Co-authored-by: Harsh Khandeparkar <34770591+HarshKhandeparkar@users.noreply.github.com> Co-authored-by: Jeffrey Warren <jeff@unterbahn.com>
This commit is contained in:
@@ -310,18 +310,13 @@ function DefaultHtmlStepUi(_sequencer, options) {
|
||||
|
||||
$stepAll('.download-btn').on('click', () => {
|
||||
|
||||
for (let index = 0; index < step.linkElements.length; index++){
|
||||
|
||||
var element = document.createElement('a');
|
||||
element.setAttribute('href', step.linkElements[index].href);
|
||||
element.setAttribute('download', step.name + '.' + fileExtension(step.imgElement.src));
|
||||
element.style.display = 'none';
|
||||
document.body.appendChild(element);
|
||||
|
||||
element.click();
|
||||
|
||||
document.body.removeChild(element);
|
||||
}
|
||||
var element = document.createElement('a');
|
||||
element.setAttribute('href', step.output);
|
||||
element.setAttribute('download', step.name + '.' + fileExtension(step.imgElement.src));
|
||||
element.style.display = 'none';
|
||||
document.body.appendChild(element);
|
||||
|
||||
element.click();
|
||||
});
|
||||
|
||||
// Fill inputs with stored step options
|
||||
|
||||
Reference in New Issue
Block a user