Skip to content

Commit 43c872e

Browse files
committed
更新[BoxJs]: 修复无法手动运行脚本问题
1 parent 14ef89a commit 43c872e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

box/chavy.boxjs.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const $ = new Env('BoxJs')
22

3-
$.version = '0.7.0'
3+
$.version = '0.7.1'
44
$.versionType = 'beta'
55

66
// 存储`用户偏好`
@@ -21,7 +21,7 @@ $.json = $.name // `接口`类请求的响应体
2121
$.html = $.name // `页面`类请求的响应体
2222

2323
$.web = `https://cdn.jsdelivr.net/gh/chavyleung/scripts@${$.version}/box/chavy.boxjs.html`
24-
// $.web = `http://192.168.50.109:8080/box/chavy.boxjs.html?_=${new Date().getTime()}`
24+
$.web = `http://192.168.50.109:8080/box/chavy.boxjs.html?_=${new Date().getTime()}`
2525
// $.web = `http://192.168.8.112:8080/box/chavy.boxjs.html?_=${new Date().getTime()}`
2626

2727
!(async () => {
@@ -430,10 +430,10 @@ async function apiRunScript() {
430430
const httpapi = $.getdata('@chavy_boxjs_userCfgs.httpapi')
431431
const ishttpapi = /.*?@.*?:[0-9]+/.test(httpapi)
432432
if ($.isSurge() && ishttpapi) {
433-
const runOpts = { timeout: opts.script_timeout }
434-
await $.getScript(opts.script_url).then((script) => $.runScript(script, runOpts))
433+
const runOpts = { timeout: opts.timeout }
434+
await $.getScript(opts.url).then((script) => $.runScript(script, runOpts))
435435
} else {
436-
await $.getScript(opts.script_url).then((script) => {
436+
await $.getScript(opts.url).then((script) => {
437437
// 避免被执行脚本误认为是 rewrite 环境
438438
// 所以需要 `$request = undefined`
439439
$request = undefined

0 commit comments

Comments
 (0)