Skip to content

Commit

Permalink
style: add indentation to js code
Browse files Browse the repository at this point in the history
  • Loading branch information
cotes2020 committed Dec 3, 2024
1 parent a16aa7d commit 4180992
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions _includes/pageviews/goatcounter.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
const url = `https://{{ site.analytics.goatcounter.id }}.goatcounter.com/counter/${encodeURIComponent(uri)}.json`;

fetch(url)
.then((response) => response.json())
.then((data) => {
const count = data.count.replace(/\s/g, '');
pv.innerText = new Intl.NumberFormat().format(count);
})
.catch((error) => {
pv.innerText = '1';
});
.then((response) => response.json())
.then((data) => {
const count = data.count.replace(/\s/g, '');
pv.innerText = new Intl.NumberFormat().format(count);
})
.catch((error) => {
pv.innerText = '1';
});
}
});
</script>

0 comments on commit 4180992

Please sign in to comment.