Skip to content

Commit

Permalink
fix(boxjs): 全局静默状态下没有发出查询警告
Browse files Browse the repository at this point in the history
  • Loading branch information
chavyleung committed Mar 6, 2024
1 parent 6ca6128 commit eb93937
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 2 deletions.
9 changes: 8 additions & 1 deletion box/chavy.boxjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const $ = new Env('BoxJs')
// 为 eval 准备的上下文环境
const $eval_env = {}

$.version = '0.14.1'
$.version = '0.14.2'
$.versionType = 'beta'

// 发出的请求需要需要 Surge、QuanX 的 rewrite
Expand Down Expand Up @@ -226,6 +226,10 @@ async function handleQuery() {
)

if (!isMuteQueryAlert) {
// 关闭静默状态
const _isMute = $.isMute
$.isMute = false

$.msg(
$.name,
'❗️发现有脚本或人正在读取你的数据',
Expand All @@ -235,6 +239,9 @@ async function handleQuery() {
'2. 在 BoxJs 的页面 (侧栏) 中 "不显示查询警告"'
].join('\n')
)

// 还原静默状态
$.isMute = _isMute
}

$.log(
Expand Down
16 changes: 16 additions & 0 deletions box/release/box.release.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
{
"releases": [
{
"version": "0.14.2",
"tags": ["beta"],
"author": "@chavyleung",
"msg": "fix(boxjs): 全局静默状态下没有发出查询警告",
"notes": [
{
"name": "修复",
"descs": ["全局静默状态下没有发出查询警告"]
},
{
"name": "感谢",
"descs": ["@MuTu888 反馈"]
}
]
},
{
"version": "0.14.1",
"tags": ["beta"],
Expand Down
16 changes: 16 additions & 0 deletions box/release/box.release.tf.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
{
"releases": [
{
"version": "0.14.2",
"tags": ["beta"],
"author": "@chavyleung",
"msg": "fix(boxjs): 全局静默状态下没有发出查询警告",
"notes": [
{
"name": "修复",
"descs": ["全局静默状态下没有发出查询警告"]
},
{
"name": "感谢",
"descs": ["@MuTu888 反馈"]
}
]
},
{
"version": "0.14.1",
"tags": ["beta"],
Expand Down
9 changes: 8 additions & 1 deletion chavy.box.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const $ = new Env('BoxJs')
// 为 eval 准备的上下文环境
const $eval_env = {}

$.version = '0.14.1'
$.version = '0.14.2'
$.versionType = 'beta'

// 发出的请求需要需要 Surge、QuanX 的 rewrite
Expand Down Expand Up @@ -226,6 +226,10 @@ async function handleQuery() {
)

if (!isMuteQueryAlert) {
// 关闭静默状态
const _isMute = $.isMute
$.isMute = false

$.msg(
$.name,
'❗️发现有脚本或人正在读取你的数据',
Expand All @@ -235,6 +239,9 @@ async function handleQuery() {
'2. 在 BoxJs 的页面 (侧栏) 中 "不显示查询警告"'
].join('\n')
)

// 还原静默状态
$.isMute = _isMute
}

$.log(
Expand Down

0 comments on commit eb93937

Please sign in to comment.