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:
Sparks
2020-01-04 02:19:53 +07:00
committed by Jeffrey Warren
parent d3b49ff187
commit a8b6aac5b3

View File

@@ -310,18 +310,13 @@ function DefaultHtmlStepUi(_sequencer, options) {
$stepAll('.download-btn').on('click', () => { $stepAll('.download-btn').on('click', () => {
for (let index = 0; index < step.linkElements.length; index++){ var element = document.createElement('a');
element.setAttribute('href', step.output);
var element = document.createElement('a'); element.setAttribute('download', step.name + '.' + fileExtension(step.imgElement.src));
element.setAttribute('href', step.linkElements[index].href); element.style.display = 'none';
element.setAttribute('download', step.name + '.' + fileExtension(step.imgElement.src)); document.body.appendChild(element);
element.style.display = 'none';
document.body.appendChild(element); element.click();
element.click();
document.body.removeChild(element);
}
}); });
// Fill inputs with stored step options // Fill inputs with stored step options