✨ Popup 增加脚本设置与站点范围快捷操作 - #1646
Open
CodFrm wants to merge 1 commit into
Open
Conversation
Collaborator
|
我没空检查 PR 了 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist / 检查清单
背景
为 Popup 增加快捷的脚本设置入口,并提供可选的站点范围操作,让用户无需进入完整编辑流程即可把脚本限制到当前站点,或重新允许脚本在当前站点执行。
本次改动
实现考虑
@match/@include始终是执行范围外层边界;用户允许列表不会使脚本越过作者声明的站点范围运行。selfMetadata.match保存,因此脚本更新不会覆盖用户选择。建议审查重点
onlyRunOnUrl、allowUrl与现有 exclude 语义的组合。关联
Closes #1590
验证
pnpm run lint:通过(Prettier、TypeScript、ESLint、i18n、issue templates)。pnpm test:311 个测试文件、3500 个测试全部通过。pnpm run build:通过;仅有仓库现有的 bundle size 与 Monaco 动态require警告。pnpm exec playwright test --config playwright.scratch.config.ts e2e/scratch/verify-issue-1590.spec.ts:2/2 通过。git diff --check:通过。Screenshots / 截图
已通过真实构建扩展人工核对 Pencil 定稿
Feature - 站点范围 · 定稿 v2(展开区动作项):站点主操作使用$primary蓝色,排除操作为橙色,删除操作为红色;生效与受限两种展开状态均已截图验证。