forked from sec-an/Better-Auto-XXQG
-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.js
27 lines (23 loc) · 844 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
26
27
console.clear();
http.__okhttp__.setTimeout(10000);
let url = [
'https://gh-proxy.com/https://raw.githubusercontent.com/sec-an/Better-Auto-XXQG/main/UI.js',
"https://ghproxy.com/https://raw.githubusercontent.com/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) {
console.log(error);
}
}
engines.execScript("UI", UI);