initial commit
This commit is contained in:
commit
91c4c3ce12
3 changed files with 200 additions and 0 deletions
13
script.js
Normal file
13
script.js
Normal file
|
@ -0,0 +1,13 @@
|
|||
const instances = [["kc","https://kitsunes.club/nodeinfo/2.1"],["kg","https://kitsunes.gay/nodeinfo/2.1"], ["kdev", "https://kitsunes.dev/api/v1/nodeinfo"]]
|
||||
|
||||
for (const instance of instances) {
|
||||
fetch(instance[1]).then(response => {
|
||||
if (!response.ok) throw false;
|
||||
response.json().then(output => {
|
||||
console.log(output)
|
||||
const instanceNode = document.getElementById(instance[0]);
|
||||
instanceNode.querySelector(".user-count").innerText = output.usage.users.total.toLocaleString('en');
|
||||
instanceNode.querySelector(".note-count").innerText = output.usage.localPosts.toLocaleString('en');
|
||||
})
|
||||
})
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue