style: add indentation to js code
This commit is contained in:
parent
a16aa7d41e
commit
4180992272
1 changed files with 8 additions and 8 deletions
|
@ -8,14 +8,14 @@
|
||||||
const url = `https://{{ site.analytics.goatcounter.id }}.goatcounter.com/counter/${encodeURIComponent(uri)}.json`;
|
const url = `https://{{ site.analytics.goatcounter.id }}.goatcounter.com/counter/${encodeURIComponent(uri)}.json`;
|
||||||
|
|
||||||
fetch(url)
|
fetch(url)
|
||||||
.then((response) => response.json())
|
.then((response) => response.json())
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
const count = data.count.replace(/\s/g, '');
|
const count = data.count.replace(/\s/g, '');
|
||||||
pv.innerText = new Intl.NumberFormat().format(count);
|
pv.innerText = new Intl.NumberFormat().format(count);
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
pv.innerText = '1';
|
pv.innerText = '1';
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in a new issue