Skip to content

[v1.3] 更新 Subscribe 相关代码和追加注释#1198

Open
cyfung1031 wants to merge 2 commits intoscriptscat:release/v1.3from
cyfung1031:pr-subscribe-update
Open

[v1.3] 更新 Subscribe 相关代码和追加注释#1198
cyfung1031 wants to merge 2 commits intoscriptscat:release/v1.3from
cyfung1031:pr-subscribe-update

Conversation

@cyfung1031
Copy link
Collaborator

@cyfung1031 cyfung1031 commented Feb 4, 2026

修正1

修正了 Subscribe 订阅、Script 直接安装,以及多个 Subscribe 之间的冲突问题
脚本的删除行为将只依首次安装方式决定

虽然 Subscribe 会关联脚本的 UUID,但若该 Subscribe 并非首次安装来源,即使删除该 Subscribe,也不会删除脚本。

行为说明如下:

  • 若首次以「连结方式」安装脚本,后续其他 Subscribe 内包含相同 Script URL,只会建立 UUID 关联;删除这些 Subscribe 不会删除脚本。
  • 若首次以 SubscribeA 安装脚本,之后再以连结方式或 SubscribeB 安装,则只有移除 SubscribeA 或直接删除脚本时,脚本才会被删除;删除 SubscribeB 不会影响该脚本。

修正2

  • 加强了错误检查

修正3

  • 加了注释

Script 的单独安装处理有可能提交另一个PR处理。
这只针对 Subscribe本身的处理

@cyfung1031 cyfung1031 changed the title 更新 Subscribe 相关代码和追加注释 [v1.3] 更新 Subscribe 相关代码和追加注释 Feb 4, 2026
Comment on lines +9 to +10
unknown3: 3, // 3 是什么?
unknown4: 4, // 4 是什么?
Copy link
Collaborator Author

@cyfung1031 cyfung1031 Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@CodFrm
你看看要不要删掉 3 和 4
现在的代码已经没有 3 和 4
可能是你的旧代码留下来的?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我也不记得了,应该可以删除

// @description 订阅xxx系列脚本
// @version 0.1.0
// @author You
// @connect www.baidu.com
Copy link
Collaborator Author

@cyfung1031 cyfung1031 Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@CodFrm

UserSubscribe 里面的 @connect 好像没什么作用吧。还是说你希望这个 UserSubscribe 包含的 @connect 会让 Script脚本的 slient update 时跳过检查?也就是即使脚本本身 @connect 有变化, 只要Subscribe里有这个网域,就不视作变化而进行 slience update?

这样的话 update 时要反查 subscribe 然后做处理
这个暂时在SC未有

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是的,订阅安装的脚本使用订阅的 @connect,我记得我处理过

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是的,订阅安装的脚本使用订阅的 @connect,我记得我处理过

@cyfung1031
Copy link
Collaborator Author

cyfung1031 commented Feb 5, 2026

@CodFrm 我追查了一下,你升级到MV3时已经写反了

if (!checkDisable && subscribe.status === SUBSCRIBE_STATUS_ENABLE) {

这里应该是 disable 不是 enable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants