更新 'mcbbs/fetch-emerald.user.js'
This commit is contained in:
parent
a54b7f6f57
commit
9ebc0a63e5
@ -1,12 +1,13 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name 自动抓取用户信息
|
// @name 自动抓取用户信息
|
||||||
// @namespace https://miaowoo.cc/
|
// @namespace https://miaowoo.cc/
|
||||||
// @version 0.4
|
// @version 0.1.5
|
||||||
// @description 自动抓取用户信息
|
// @description 自动抓取用户信息
|
||||||
// @author MiaoWoo
|
// @author MiaoWoo
|
||||||
// @match https://www.mcbbs.net/forum.php?mod=viewthread&tid=**
|
// @match https://www.mcbbs.net/forum.php?mod=viewthread&tid=**
|
||||||
// @match https://www.mcbbs.net/thread-**-*-*.html
|
// @match https://www.mcbbs.net/thread-**-*-*.html
|
||||||
// @match https://www.mcbbs.net/home.php?mod=space&uid=**
|
// @match https://www.mcbbs.net/home.php?mod=space&uid=**
|
||||||
|
// @run-at document-start
|
||||||
// @grant none
|
// @grant none
|
||||||
// ==/UserScript==
|
// ==/UserScript==
|
||||||
|
|
||||||
@ -48,7 +49,8 @@
|
|||||||
var emerald = scoreInfo.children[5].innerText.replace(scoreInfo.children[5].children[0].innerText, '')
|
var emerald = scoreInfo.children[5].innerText.replace(scoreInfo.children[5].children[0].innerText, '')
|
||||||
postUserInfo(uid, username, glod, emerald)
|
postUserInfo(uid, username, glod, emerald)
|
||||||
}
|
}
|
||||||
setTimeout(location.pathname == "/home.php" ? readSingleUserInfo : readAllUserInfo, 200)
|
window.alert = function (...args) { console.log(args) }
|
||||||
|
setTimeout(location.pathname == "/home.php" ? readSingleUserInfo : readAllUserInfo, 2000)
|
||||||
function addiFrame(url) {
|
function addiFrame(url) {
|
||||||
var body = document.getElementsByTagName("body")
|
var body = document.getElementsByTagName("body")
|
||||||
var div = document.createElement("div")
|
var div = document.createElement("div")
|
||||||
@ -56,15 +58,7 @@
|
|||||||
document.body.appendChild(div)
|
document.body.appendChild(div)
|
||||||
}
|
}
|
||||||
function updateOldUserInfo() {
|
function updateOldUserInfo() {
|
||||||
fetch('https://reward.yumc.pw/mcbbs/updateList').then(function (response) {
|
fetch('https://reward.yumc.pw/mcbbs/updateList')
|
||||||
return response.json()
|
|
||||||
}).then(function (result) {
|
|
||||||
if (result.code == 200 && result.data && result.data.length) {
|
|
||||||
result.data.forEach(function (user) {
|
|
||||||
addiFrame(`https://www.mcbbs.net/home.php?mod=space&uid=${user.uid}`)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
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, {
|
||||||
|
Loading…
Reference in New Issue
Block a user