From 2921085be1cde0a0af5fc22a96d3169758adbff1 Mon Sep 17 00:00:00 2001 From: Tor KNUTSSON Date: Tue, 24 Sep 2019 10:27:59 +0200 Subject: [PATCH] Fixed csb demo loader --- src/Demo/Blazor.FileReader.Wasm.Demo/wwwroot/index.html | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/Demo/Blazor.FileReader.Wasm.Demo/wwwroot/index.html b/src/Demo/Blazor.FileReader.Wasm.Demo/wwwroot/index.html index 19c3ec4..f5e2730 100644 --- a/src/Demo/Blazor.FileReader.Wasm.Demo/wwwroot/index.html +++ b/src/Demo/Blazor.FileReader.Wasm.Demo/wwwroot/index.html @@ -39,7 +39,7 @@ if (!window.XMLHttpRequest) { return; } - var $ = document.getElementById; + var total = 0; var loaded = 0; @@ -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.