更新 'mcbbs/server-bump.user.js'
This commit is contained in:
parent
ece4dc34de
commit
8729c4d6e6
@ -1,7 +1,7 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name 圈云盒子顶帖器
|
// @name 圈云盒子顶帖器
|
||||||
// @namespace https://circlecloud.ltd/
|
// @namespace https://circlecloud.ltd/
|
||||||
// @version 0.1.7
|
// @version 0.1.8
|
||||||
// @description 自动顶贴
|
// @description 自动顶贴
|
||||||
// @author MiaoWoo
|
// @author MiaoWoo
|
||||||
// @match https://www.mcbbs.net/forum-server-1.html**
|
// @match https://www.mcbbs.net/forum-server-1.html**
|
||||||
@ -42,6 +42,9 @@
|
|||||||
return serverInfo
|
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) {
|
async function post(method, data) {
|
||||||
return await fetch('https://reward.yumc.pw/mcbbs/' + method, {
|
return await fetch('https://reward.yumc.pw/mcbbs/' + method, {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
@ -54,6 +57,7 @@
|
|||||||
}
|
}
|
||||||
async function main() {
|
async function main() {
|
||||||
await sleep(3000)
|
await sleep(3000)
|
||||||
|
heartbeat()
|
||||||
//feat: auto refresh when mcbbs return 504
|
//feat: auto refresh when mcbbs return 504
|
||||||
let errorh1 = document.getElementsByTagName('h1')[0]
|
let errorh1 = document.getElementsByTagName('h1')[0]
|
||||||
if (errorh1 && errorh1.innerText.startsWith(50)) {
|
if (errorh1 && errorh1.innerText.startsWith(50)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user