Skip to content

Commit

Permalink
Fixed csb demo loader
Browse files Browse the repository at this point in the history
  • Loading branch information
Tor KNUTSSON committed Sep 24, 2019
1 parent 36d0281 commit 2921085
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/Demo/Blazor.FileReader.Wasm.Demo/wwwroot/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
if (!window.XMLHttpRequest) {
return;
}
var $ = document.getElementById;

var total = 0;
var loaded = 0;

Expand All @@ -49,11 +49,10 @@
total++;
this.addEventListener("load", function () {
loaded++;

var progress = Math.floor(((loaded / total) * 100));
$("pbar").max = total;
$("pbar").value = loaded;
$("loadingText").innerHTML = "Loaded " + file + ", " + progress + " %..."
document.getElementById("pbar").max = total;
document.getElementById("pbar").value = loaded;
document.getElementById("loadingText").innerHTML = "Loaded " + file + ", " + progress + " %..."

if (loaded == total) {
// Reset override.
Expand Down

0 comments on commit 2921085

Please sign in to comment.