Replace double quotes with single quotes
This commit is contained in:
parent
cd75f5b97d
commit
7ba71de5e7
@ -599,7 +599,7 @@ async function getBrowser() {
|
|||||||
|
|
||||||
function storageBytesToLabeledString(size) {
|
function storageBytesToLabeledString(size) {
|
||||||
const base = 1000;
|
const base = 1000;
|
||||||
const labels = ["bytes", "KB", "MB", "GB"];
|
const labels = ['bytes', 'KB', 'MB', 'GB'];
|
||||||
let labelIndex = 0;
|
let labelIndex = 0;
|
||||||
while (size >= base) {
|
while (size >= base) {
|
||||||
size /= base;
|
size /= base;
|
||||||
@ -619,14 +619,14 @@ storageEstimate.mostRecent = null;
|
|||||||
|
|
||||||
async function storageInfoInitialize() {
|
async function storageInfoInitialize() {
|
||||||
const browser = await getBrowser();
|
const browser = await getBrowser();
|
||||||
const container = document.querySelector("#storage-info");
|
const container = document.querySelector('#storage-info');
|
||||||
container.setAttribute("data-browser", browser);
|
container.setAttribute('data-browser', browser);
|
||||||
|
|
||||||
await storageShowInfo();
|
await storageShowInfo();
|
||||||
|
|
||||||
container.classList.remove("storage-hidden");
|
container.classList.remove('storage-hidden');
|
||||||
|
|
||||||
document.querySelector("#storage-refresh").addEventListener('click', () => storageShowInfo(), false);
|
document.querySelector('#storage-refresh').addEventListener('click', () => storageShowInfo(), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function storageUpdateStats() {
|
async function storageUpdateStats() {
|
||||||
@ -636,8 +636,8 @@ async function storageUpdateStats() {
|
|||||||
const valid = (estimate !== null);
|
const valid = (estimate !== null);
|
||||||
|
|
||||||
if (valid) {
|
if (valid) {
|
||||||
document.querySelector("#storage-usage").textContent = storageBytesToLabeledString(estimate.usage);
|
document.querySelector('#storage-usage').textContent = storageBytesToLabeledString(estimate.usage);
|
||||||
document.querySelector("#storage-quota").textContent = storageBytesToLabeledString(estimate.quota);
|
document.querySelector('#storage-quota').textContent = storageBytesToLabeledString(estimate.quota);
|
||||||
}
|
}
|
||||||
|
|
||||||
storageUpdateStats.isUpdating = false;
|
storageUpdateStats.isUpdating = false;
|
||||||
@ -649,8 +649,8 @@ async function storageShowInfo() {
|
|||||||
storageSpinnerShow(true);
|
storageSpinnerShow(true);
|
||||||
|
|
||||||
const valid = await storageUpdateStats();
|
const valid = await storageUpdateStats();
|
||||||
document.querySelector("#storage-use").classList.toggle("storage-hidden", !valid);
|
document.querySelector('#storage-use').classList.toggle('storage-hidden', !valid);
|
||||||
document.querySelector("#storage-error").classList.toggle("storage-hidden", valid);
|
document.querySelector('#storage-error').classList.toggle('storage-hidden', valid);
|
||||||
|
|
||||||
storageSpinnerShow(false);
|
storageSpinnerShow(false);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user