show a percentage in the splash screen if we can

This commit is contained in:
Daniel Brooks
2015-03-25 19:08:14 -07:00
parent b5076a16e5
commit ea79f25fdb
+4 -1
View File
@@ -624,7 +624,10 @@ var Module = null;
var formatSize = function (event) {
if (event.lengthComputable)
return "("+ formatBytes(event.loaded) +" of "+ formatBytes(event.total) +")";
return "("+ (event.total ? (event.loaded / event.total * 100).toFixed(0)
: "100") +
"%; "+ formatBytes(event.loaded) +
" of "+ formatBytes(event.total) +")";
return "("+ formatBytes(event.loaded) +")";
};