From f80ecbde71fab849b339acfe94781583e76aebd7 Mon Sep 17 00:00:00 2001 From: JeLuF Date: Tue, 21 Feb 2023 00:49:04 +0100 Subject: [PATCH] Download all: Fix to download more than 10 images https://discord.com/channels/1014774730907209781/1021695193499582494/1077218966205902860 --- ui/media/js/main.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ui/media/js/main.js b/ui/media/js/main.js index ed4e7134..b53511d0 100644 --- a/ui/media/js/main.js +++ b/ui/media/js/main.js @@ -1163,14 +1163,15 @@ clearAllPreviewsBtn.addEventListener('click', (e) => { shiftOrConfirm(e, "Clear })}) saveAllImagesBtn.addEventListener('click', (e) => { + let i = 0 document.querySelectorAll(".imageTaskContainer").forEach(container => { let req = htmlTaskMap.get(container) container.querySelectorAll(".imgContainer img").forEach(img => { if (img.closest('.imgItem').style.display === 'none') { return } - - onDownloadImageClick(req.reqBody, img) + setTimeout(() => {onDownloadImageClick(req, img)}, i*200) + i = i+1 }) }) })