added progress to tab title when not in focus

This commit is contained in:
Danny Coates 2017-08-08 19:46:15 -07:00
parent c13839a522
commit c38d91db98
No known key found for this signature in database
GPG key ID: 4C442633C62E00CB
2 changed files with 26 additions and 4 deletions

View file

@ -123,10 +123,17 @@ function bytes(num) {
return `${nStr}${UNITS[exponent]}`;
}
function percent(ratio) {
return LOCALIZE_NUMBERS
? ratio.toLocaleString(navigator.languages, { style: 'percent' })
: `${Math.floor(ratio * 100)}%`;
}
const ONE_DAY_IN_MS = 86400000;
module.exports = {
bytes,
percent,
copyToClipboard,
arrayToHex,
hexToArray,