Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

希望能支持Firefox #5

Closed
Kirk300 opened this issue Oct 12, 2023 · 7 comments
Closed

希望能支持Firefox #5

Kirk300 opened this issue Oct 12, 2023 · 7 comments

Comments

@Kirk300
Copy link

Kirk300 commented Oct 12, 2023

RT

@lqzhgood
Copy link
Owner

lqzhgood commented Oct 12, 2023

是 Firefox 的 Bug~ 对一个网站只能匹配一个规则.....
提交问题到社区了~ 看会不会改吧

https://discourse.mozilla.org/t/cannot-match-multiple-declarativenetrequest-rules-on-the-same-website-on-firefox-using-manifest-v3/123306

@lqzhgood
Copy link
Owner

#4
same as

@lqzhgood
Copy link
Owner

研究了一下,核心点在于规范并未明确多条规则匹配时浏览器的处理方式,也不能算 bug 吧。

firefox 选择仅匹配优先级最高的一条(类型:重定向优先 > priority 字段)
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/declarativeNetRequest#matching_precedents

chrome 选择全部匹配 ( priority > 类型)
https://developer.chrome.com/docs/extensions/reference/declarativeNetRequest/#implementation-matching-algorithm

firefox 单独写了一套,使用内嵌 js 的方式绕过限制,会多一个 scripting 的权限,加载一个脚本(Chrome 0 脚本)。 其余效果一致。

@dev-techmoe
Copy link

有没有考虑把这个插件发布到 https://addons.mozilla.org/

如果不想上架的话,看起来插件需要走firefox签名一下,之后可以选择自己分发而不展示到商店里。

https://extensionworkshop.com/documentation/publish/signing-and-distribution-overview

@lqzhgood
Copy link
Owner

lqzhgood commented Dec 1, 2023

@dev-techmoe 文档内有~

@lqzhgood
Copy link
Owner

lqzhgood commented Dec 1, 2023

放到 Releases 里去了

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

No branches or pull requests

3 participants