From 461285585c6ea332685a86f7c752dd3d77cdbb28 Mon Sep 17 00:00:00 2001 From: kaotisk Date: Wed, 27 Dec 2023 16:34:54 +0200 Subject: Set different progress bar for each request --- src/js/arching-kaos-fetch.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/js/arching-kaos-fetch.js b/src/js/arching-kaos-fetch.js index 57d03c9..9b401a3 100644 --- a/src/js/arching-kaos-fetch.js +++ b/src/js/arching-kaos-fetch.js @@ -13,9 +13,10 @@ function archingKaosFetchJSON( url, callback, params ){ }); request.addEventListener("progress", (event)=>{ if (event.lengthComputable && progressPlaceholder){ - progressPlaceholder.value = (event.loaded / event.total) * 100; + httpProgressPlaceholder.value = (event.loaded / event.total) * 100; } else { - progressPlaceholder.value = 0; + httpProgressPlaceholder.value = 0; + console.log("Supposingly zeroed progressPlaceholder"); } }); request.addEventListener("abort", ()=>{ -- cgit v1.2.3