Skip to content

Commit cf5a56a

Browse files
committed
fix: sw captcha match
1 parent 7a4e854 commit cf5a56a

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

packages/captcha/captcha.user.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
// ==UserScript==
22
// @name SWVerifyCode
33
// @namespace https://github.com/WindrunnerMax/TKScript
4-
// @version 1.1
4+
// @version 1.1.1
55
// @description try to take over the world!
66
// @author Czy
7-
// @match *://jwgl.sdust.edu.cn/
8-
// @match *://jwgl.sdust.edu.cn/jsxsd/
7+
// @match *://jwgl.sdust.edu.cn/*
98
// @grant none
109
// ==/UserScript==
1110

@@ -164,7 +163,7 @@ function main() {
164163
(function () {
165164
"use strict";
166165
const img = document.getElementById("SafeCodeImg");
167-
img.onload = function () {
168-
main();
169-
};
166+
if (!img) return void 0;
167+
img.onload = main;
168+
img.complete && main();
170169
})();

0 commit comments

Comments
 (0)