From 46ade700bdf56f6216567aff8e650b3f15558c21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B1=85=E6=A1=89?= Date: Tue, 15 Feb 2022 23:32:35 +0800 Subject: [PATCH] add gitee url --- main.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/main.js b/main.js index 777ae65..1044337 100644 --- a/main.js +++ b/main.js @@ -3,6 +3,7 @@ console.clear(); http.__okhttp__.setTimeout(10000); let url = [ + 'https://gitee.com/sec-an/js/raw/master/UI.js', 'http://cdn.sec-an.cn/Better-Auto-XXQG/UI.js', 'https://github.secan.workers.dev/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', @@ -12,15 +13,14 @@ let url = [ for (var i = 0; i < url.length; i++) { try { let res = http.get(url[i]); - console.log(res.statusCode); + console.log(i + ":" + res.statusCode); if (res.statusCode == 200) { var UI = res.body.string(); - break; + if (UI.indexOf('"ui";') == 0) break; } else { - toast('UI脚本:地址' + i + '下载失败'); - console.log('UI脚本:地址' + i + '下载失败'); + toastLog()('UI脚本:地址' + i + '下载失败'); } } catch (error) {} } -engines.execScript("UI", UI); \ No newline at end of file +engines.execScript("UI", UI);