Skip to content

Commit 05cea3c

Browse files
committed
Merge pull request #71 from mgilfillan/patch-1
Updated str_to_bytes function to recognise Terabytes
2 parents 4de4ec3 + 632223a commit 05cea3c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

html/js/scriptin.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1024,7 +1024,9 @@ function seconds_to_time(seconds) {
10241024
}
10251025

10261026
function str_to_bytes(str) {
1027-
if (str.substr(-1) == 'G')
1027+
if (str.substr(-1) == 'T')
1028+
return parseFloat(str) * Math.pow(10,12);
1029+
else if (str.substr(-1) == 'G')
10281030
return parseFloat(str) * Math.pow(10,9);
10291031
else if (str.substr(-1) == 'M')
10301032
return parseFloat(str) * Math.pow(10,6);

0 commit comments

Comments
 (0)