更新 'mcbbs/server-bump.user.js'

This commit is contained in:
502647092 2023-07-18 07:33:43 +00:00
parent ece4dc34de
commit 8729c4d6e6

View File

@ -1,7 +1,7 @@
// ==UserScript==
// @name 圈云盒子顶帖器
// @namespace https://circlecloud.ltd/
// @version 0.1.7
// @version 0.1.8
// @description 自动顶贴
// @author MiaoWoo
// @match https://www.mcbbs.net/forum-server-1.html**
@ -42,6 +42,9 @@
return serverInfo
})
}
async function heartbeat() {
return fetch('https://kuma.yumc.pw/api/push/mf8vCxnXk5?status=up&msg=OK&ping=').then(r=>r.json()).catch(e=>console.log(e))
}
async function post(method, data) {
return await fetch('https://reward.yumc.pw/mcbbs/' + method, {
method: "POST",
@ -54,6 +57,7 @@
}
async function main() {
await sleep(3000)
heartbeat()
//feat: auto refresh when mcbbs return 504
let errorh1 = document.getElementsByTagName('h1')[0]
if (errorh1 && errorh1.innerText.startsWith(50)) {