libs

JavaScript 库函数,以便调用

2024-04-08 या दिनांकाला. सर्वात नवीन आवृत्ती पाहा.

This script should not be not be installed directly. It is a library for other scripts to include with the meta directive // @require https://update.greasyfork.ip-ddns.com/scripts/491971/1356547/libs.js

लेखक
Essence
आवृत्ती
0.1
बनवली
2024-04-08
अपडेट केली
2024-04-08
आकार
1.9 KB
License
नाही

库函数

使用

sleep

等待毫秒数

await sleep(3000)

waitElem

  const click = (elem) => {
    console.log(TAG, "人机验证的选择框", elem)
    elem.click()
  }

  waitElem("div#challenge-stage span.mark", click)

readLocalStorageValues

const history = readLocalStorageValues(/^Hm_lvt/)

restoreLocalStorageValues

const json = `{"a": 123, "b": "test"}`

restoreLocalStorageValues(json)

containerToRow

const root = document.querySelector("body")

containerToRow(root)