更新 'mcbbs/vending-machine.user.js'
This commit is contained in:
parent
f66501b36f
commit
310a76d51d
@ -12,6 +12,7 @@
|
||||
let store = window.localStorage
|
||||
const lastOrderKey = 'circlebox:lastorder'
|
||||
let checkTimes = 0
|
||||
let stock = 0
|
||||
async function sleep(time) {
|
||||
return new Promise((resolve, reject) => setTimeout(resolve, time))
|
||||
}
|
||||
@ -25,6 +26,7 @@
|
||||
await shopAction(params)
|
||||
break
|
||||
case "mybox":
|
||||
stock = updateStock()
|
||||
await myboxAction(params)
|
||||
break
|
||||
case "log":
|
||||
@ -79,7 +81,6 @@
|
||||
let messagetext = document.getElementById('messagetext')
|
||||
updateStatus(messagetext && messagetext.innerText || '')
|
||||
let count = 0
|
||||
let stock = updateStock()
|
||||
let result = await fetch('https://reward.yumc.pw/mcbbs/needSendOrder').then(r => r.json())
|
||||
if (result.code != 200) {
|
||||
if (++checkTimes > 30 || back) {
|
||||
|
Loading…
Reference in New Issue
Block a user