Skip to content
This repository was archived by the owner on May 21, 2024. It is now read-only.

Commit 10c2aea

Browse files
committed
shorten unit
1 parent af1396f commit 10c2aea

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

files/www/lan/home.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ function formatSize(bytes) {
55
} else if (bytes < 1000) {
66
return bytes + " B";
77
} else if (bytes < 1000*1000) {
8-
return (bytes/ 1000.0).toFixed(0) + " KB";
8+
return (bytes/ 1000.0).toFixed(0) + " K";
99
} else if (bytes < 1000*1000*1000) {
10-
return (bytes/1000.0/1000.0).toFixed(1) + " MB";
10+
return (bytes/1000.0/1000.0).toFixed(1) + " M";
1111
} else {
12-
return (bytes/1000.0/1000.0/1000.0).toFixed(2) + " GB";
12+
return (bytes/1000.0/1000.0/1000.0).toFixed(2) + " G";
1313
}
1414
}
1515

0 commit comments

Comments
 (0)