-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathmain.js
More file actions
30 lines (25 loc) · 768 Bytes
/
main.js
File metadata and controls
30 lines (25 loc) · 768 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// ==UserScript==
// @name icp-captcha-bypass
// @namespace https://github.com/JSREI/icp-captcha-bypass-userscript
// @version 0.1
// @description 避免每次都手输入验证码
// @author CC11001100
// @match https://m-beian.miit.gov.cn/*
// @grant none
// ==/UserScript==
(async () => {
async function sleep(mils) {
return new Promise((resolve) => setTimeout(resolve, mils));
}
Math.floor = function () {
return 5;
}
while (true) {
const x = document.querySelector("[placeholder=验证码]");
if (x) {
x.value = "666666";
x.dispatchEvent && x.dispatchEvent(new Event("input", { bubbles: true }));
}
await sleep(300);
}
})();