更新 'mcbbs/fetch-emerald.user.js'
This commit is contained in:
parent
b694f0310c
commit
832c4de243
@ -1,7 +1,7 @@
|
||||
// ==UserScript==
|
||||
// @name 自动抓取用户信息
|
||||
// @namespace https://miaowoo.cc/
|
||||
// @version 0.1.5
|
||||
// @version 0.1.6
|
||||
// @description 自动抓取用户信息
|
||||
// @author MiaoWoo
|
||||
// @match https://www.mcbbs.net/forum.php?mod=viewthread&tid=**
|
||||
@ -29,6 +29,10 @@
|
||||
postUserInfo(userline.href.split('uid=')[1].split('&')[0], userline.innerText, scoreInfo.children[1].innerText, scoreInfo.children[3].innerText)
|
||||
}
|
||||
function readAllUserInfo() {
|
||||
let errorh1 = document.getElementsByTagName('h1')[0]
|
||||
if (errorh1 && errorh1.innerText.startsWith(50)) {
|
||||
return location.href = location.href
|
||||
}
|
||||
if (location.href == 'https://www.mcbbs.net/thread-1121423-1-1.html') {
|
||||
console.log("已开启自动刷新...")
|
||||
setTimeout(function () {
|
||||
@ -51,14 +55,8 @@
|
||||
}
|
||||
window.alert = function (...args) { console.log(args) }
|
||||
setTimeout(location.pathname == "/home.php" ? readSingleUserInfo : readAllUserInfo, 2000)
|
||||
function addiFrame(url) {
|
||||
var body = document.getElementsByTagName("body")
|
||||
var div = document.createElement("div")
|
||||
div.innerHTML = '<iframe src="' + url + '" height = "0" width = "0" frameborder="0" scrolling="auto" style = "display:none;visibility:hidden" ></iframe>'
|
||||
document.body.appendChild(div)
|
||||
}
|
||||
function updateOldUserInfo() {
|
||||
fetch('https://reward.yumc.pw/mcbbs/updateList')
|
||||
fetch('https://reward.yumc.pw/mcbbs/updateList').then(resp => resp.json()).then(json => document.getElementById('scbar_txt').value = json.data)
|
||||
}
|
||||
async function post(method, data) {
|
||||
return await fetch('https://reward.yumc.pw/mcbbs/' + method, {
|
||||
|
Loading…
Reference in New Issue
Block a user