en:user:gs3_sample_format_statements
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
en:user:gs3_sample_format_statements [2016/10/09 21:01] – [Linking metadata to a search] kjdon | en:user:gs3_sample_format_statements [2016/10/09 21:46] – [Linking metadata to a search] kjdon | ||
---|---|---|---|
Line 203: | Line 203: | ||
* s1.index=CR | * s1.index=CR | ||
+ | ==== adding in new javascript ==== | ||
+ | |||
+ | Displaying human readable filesize. | ||
+ | |||
+ | < | ||
+ | <td> | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </td> | ||
+ | <td> | ||
+ | |||
+ | <script type=" | ||
+ | | ||
+ | bytes =</ | ||
+ | var filesize = bytes + " bytes"; | ||
+ | if (bytes > 1048576) { | ||
+ | filesize = Math.round(bytes / 1048576.0) + " MB"; | ||
+ | } | ||
+ | else if (bytes > 1024) { | ||
+ | filesize = Math.round(bytes/ | ||
+ | } | ||
+ | document.write(filesize); | ||
+ | |||
+ | </ | ||
+ | | ||
+ | </td> | ||
+ | </ | ||
en/user/gs3_sample_format_statements.txt · Last modified: 2023/03/13 01:46 by 127.0.0.1