上传文件至「Scripts」
This commit is contained in:
@@ -382,7 +382,13 @@ function ObjectKeys2LowerCase(obj) {
|
||||
/* ====================== 入口 ====================== */
|
||||
!(async () => {
|
||||
try {
|
||||
if (typeof $request !== "undefined") {
|
||||
// 判断运行模式:
|
||||
// - http-response 脚本:$response 存在(含 body)→ 抓 cookie
|
||||
// - cron / 手动执行 / Node.js:$response 不存在 → 签到
|
||||
// 不能用 $request 判断,因为某些 Surge 版本在 cron 里也会注入 $request
|
||||
const isMitmMode =
|
||||
typeof $response !== "undefined" && $response && $response.body;
|
||||
if (isMitmMode) {
|
||||
await getCookie();
|
||||
} else {
|
||||
await checkEnv();
|
||||
|
||||
Reference in New Issue
Block a user