forked from sec-an/Better-Auto-XXQG
-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.js
25 lines (21 loc) · 780 Bytes
/
main.js
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
console.clear();
http.__okhttp__.setTimeout(10000);
let url = [
'https://ghproxy.com/https://raw.githubusercontent.com/sec-an/Better-Auto-XXQG/main/UI.js',
"https://raw.gh.fakev.cn/sec-an/Better-Auto-XXQG/main/UI.js",
'https://cdn.jsdelivr.net/gh/sec-an/Better-Auto-XXQG@main/UI.js',
'https://raw.githubusercontent.com/sec-an/Better-Auto-XXQG/main/UI.js',
];
for (var i = 0; i < url.length; i++) {
try {
let res = http.get(url[i]);
console.log(i + ":" + res.statusCode);
if (res.statusCode == 200) {
var UI = res.body.string();
if (UI.indexOf('"ui";') == 0) break;
} else {
toastLog('UI脚本:地址' + i + '下载失败');
}
} catch (error) {}
}
engines.execScript("UI", UI);