fix: 取消了本地引用js
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@ -1,19 +0,0 @@
|
||||
let server_addr = "mc.liteyuki.icu";
|
||||
let api_url = "https://api.mcstatus.io/v2/status/java/" + server_addr;
|
||||
|
||||
let server_status = document.getElementById("now-online");
|
||||
|
||||
fetch(api_url)
|
||||
.then(response => {
|
||||
console.log(response);
|
||||
return response.json();
|
||||
})
|
||||
.then(data => {
|
||||
|
||||
if (data.online){
|
||||
server_status.textContent = "当前状态: 在线 " + data.players.online + " / " +data.players.max;
|
||||
} else {
|
||||
server_status.textContent = "当前状态: 服务器离线";
|
||||
}
|
||||
}
|
||||
)
|
Reference in New Issue
Block a user