LE-Website/enchanted-harvest/static/js/home.js

7 lines
318 B
JavaScript
Raw Normal View History

2024-05-14 07:01:44 +00:00
let stats = document.getElementById("stats");
var request = new XMLHttpRequest();
request.open("GET", "https://bstats.org/api/v1/plugins/8840/charts/servers/data?maxElements=1", true);
request.onload = () => {
stats.innerText = `⚡ Powering ${JSON.parse(request.responseText)[0][1]} servers.`
}
request.send(null)