diff options
author | kaotisk <kaotisk@arching-kaos.org> | 2023-12-27 16:34:54 +0200 |
---|---|---|
committer | kaotisk <kaotisk@arching-kaos.org> | 2023-12-27 16:34:54 +0200 |
commit | 461285585c6ea332685a86f7c752dd3d77cdbb28 (patch) | |
tree | 3610a67c6d374d685848fab94f2be9ee1b1cd461 /src/js/arching-kaos-fetch.js | |
parent | 9498bba0d4455f3c3473f654309842e90b375637 (diff) | |
download | arching-kaos-web-ui-461285585c6ea332685a86f7c752dd3d77cdbb28.tar.gz arching-kaos-web-ui-461285585c6ea332685a86f7c752dd3d77cdbb28.tar.bz2 arching-kaos-web-ui-461285585c6ea332685a86f7c752dd3d77cdbb28.zip |
Set different progress bar for each request
Diffstat (limited to 'src/js/arching-kaos-fetch.js')
-rw-r--r-- | src/js/arching-kaos-fetch.js | 5 |
1 files changed, 3 insertions, 2 deletions
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", ()=>{ |