Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
16 lines
511 B
JavaScript
Executable file
16 lines
511 B
JavaScript
Executable file
'use strict';
|
|
define(function(require) {
|
|
var mozL10n = require('l10n!');
|
|
|
|
return {
|
|
/**
|
|
* Display a human-readable file size. Currently we always display
|
|
* things in kilobytes because we are targeting a mobile device and we
|
|
* want bigger sizes (like megabytes) to be obviously large numbers.
|
|
*/
|
|
fileSize: function(node, sizeInBytes) {
|
|
var kilos = Math.ceil(sizeInBytes / 1024);
|
|
mozL10n.setAttributes(node, 'attachment-size-kib', { kilobytes: kilos });
|
|
}
|
|
};
|
|
});
|