new toKB function

This commit is contained in:
Mathew committed 2019-07-27 15:32:52 +02:00
1 parent 99498f132e
commit 79f1ed58a3
1 file changed
+5
+5
View File
@@ -158,6 +158,11 @@ function requiresStyle(url) {
}
function toKB(bytes) {
let precision = 1e4
return Math.floor((bytes / 1000)*precision)/precision
}
class Storage {
static get Local() {
return {