JavaScript 库函数,以便调用
As of
This script should not be not be installed directly. It is a library for other scripts to include with the meta directive // @require https://updategf.qytechs.cn/scripts/491971/1356551/libs.js
等待毫秒数
await sleep(3000)
等待指定元素出现时,执行回调
const click = (elem) => {
console.log(TAG, "人机验证的选择框", elem)
elem.click()
}
waitElem("div#challenge-stage span.mark", click)
读取所有本地存储LocalStorage的数据,可用正则排除键
const history = readLocalStorageValues(/^Hm_lvt/)
恢复备份的JSON数据到 LocalStorage
const json = `{"a": 123, "b": "test"}`
restoreLocalStorageValues(json)
让容器以 flex row 显示子元素
const root = document.querySelector("body")
containerToRow(root)