feat(browser): 支持 Helium 浏览器的网站规则 - #129
Open
immadolf wants to merge 1 commit into
Open
Conversation
背景:Helium(net.imput.helium,ungoogled-chromium 内核)不在浏览器 bundle id 白名单中,被当作普通应用处理,无法使用按网站切换输入法的 浏览器规则。 动机:helium 的 AX 结构与 Chromium 完全一致,AXWebArea URL 获取与 OmniboxViewViews 地址栏焦点检测可直接复用,只需补充白名单条目。 关键决策: - Browser 枚举新增 Helium,displayName 返回 "Helium" - 地址栏焦点检测归入 Chromium 系分支(OmniboxViewViews) - 同步补齐 UserDefaults key、设置备份/恢复、UI 开关 - 浏览器列表 UI 基于 Browser.allCases 渲染,无需额外改动 影响范围:仅新增浏览器支持,不改动既有浏览器行为。 验证方式:本地编译通过后,在浏览器规则设置中启用 Helium, 验证按域名/正则切换输入法生效。
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.
背景
Helium(bundle id
net.imput.helium,imputnet/helium,ungoogled-chromium 内核)不在浏览器白名单中,被当作普通应用处理,无法使用按网站切换输入法的浏览器规则。改动
Browser枚举新增Helium = "net.imput.helium",displayName返回 "Helium"(浏览器列表 UI 基于Browser.allCases渲染,自动出现)OmniboxViewViews),与 Chrome/Brave/Edge 等一致isBrowserEnabled/getBrowserURL开关、UI 启用开关、设置备份/恢复字段理由
Helium 是 ungoogled-chromium 内核,AX 树结构与 Chromium 完全一致(
AXWebAreaURL 获取、OmniboxViewViews地址栏检测均可直接复用),无需额外适配逻辑。验证
closes 无对应 issue,参照 #90(ChatGPT Atlas)与 #64 先例