Skip to content

Commit

Permalink
replace with hits.goblin.run
Browse files Browse the repository at this point in the history
  • Loading branch information
barelyhuman committed Jun 25, 2023
1 parent 902f350 commit 5669bbf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 2 additions & 4 deletions www/src/lib/hits-counter.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
const urls = ['https://goblin.barelyhuman.xyz', 'https://goblin.run']
onMount(async () => {
urls.forEach((url) => {
fetch(
`https://api.hits.link/v1/hits?border=square&json=true&bgRight=27272a&bgLeft=27272a&url=${url}`
)
fetch(`https://hits.goblin.run/hits?url=${url}`)
.then((response) => {
if (!response.ok) {
throw response
Expand All @@ -15,7 +13,7 @@
return response.json()
})
.then((data) => {
count += data.data.hits
count += data.count
})
.catch((error) => {
console.log(error)
Expand Down
3 changes: 1 addition & 2 deletions www/src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,6 @@
</div>
</div>
<div>
<!-- Hits.link is down -->
<!-- <HitsCounter /> -->
<HitsCounter />
</div>
</section>

0 comments on commit 5669bbf

Please sign in to comment.