|
|
|
@ -1,7 +1,7 @@
|
|
|
|
|
// ==UserScript==
|
|
|
|
|
// @name 圈云盒子顶帖器
|
|
|
|
|
// @namespace https://circlecloud.ltd/
|
|
|
|
|
// @version 0.1.6
|
|
|
|
|
// @version 0.1.7
|
|
|
|
|
// @description 自动顶贴
|
|
|
|
|
// @author MiaoWoo
|
|
|
|
|
// @match https://www.mcbbs.net/forum-server-1.html**
|
|
|
|
@ -55,7 +55,8 @@
|
|
|
|
|
async function main() {
|
|
|
|
|
await sleep(3000)
|
|
|
|
|
//feat: auto refresh when mcbbs return 504
|
|
|
|
|
if (document.getElementsByTagName('h1')[0].innerText.startsWith(504)) {
|
|
|
|
|
let errorh1 = document.getElementsByTagName('h1')[0]
|
|
|
|
|
if (errorh1 && errorh1.innerText.startsWith(50)) {
|
|
|
|
|
return refresh()
|
|
|
|
|
}
|
|
|
|
|
let taskId = setTimeout(refresh, 60000)
|
|
|
|
@ -72,6 +73,7 @@
|
|
|
|
|
await post('updateServers', servers)
|
|
|
|
|
console.log('数据上报完成!')
|
|
|
|
|
}
|
|
|
|
|
document.getElementById('scbar_txt').value = "数据上报完成!"
|
|
|
|
|
store.lastPostServer = JSON.stringify({
|
|
|
|
|
first: servers[0].tid,
|
|
|
|
|
five: servers[5].tid,
|
|
|
|
|