lqzhgood / wechat-need-web

让微信网页版可用 / Allow the use of WeChat via webpage access
GNU General Public License v3.0
1.85k stars 166 forks source link

希望能支持Firefox #5

Closed Kirk300 closed 1 year ago

Kirk300 commented 1 year ago

RT

lqzhgood commented 1 year ago

代码符合 v3 规范~

Firefox 看看是不是权限问题

参考 https://stackoverflow.com/questions/76521184/modifyheaders-with-updatedynamicrules-doesnt-work-on-firefox-using-manifest-v3

https://discourse.mozilla.org/t/modifyheaders-with-updatedynamicrules-doesnt-work-on-firefox-using-manifest-v3/120530/2

lqzhgood commented 1 year ago

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

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

lqzhgood commented 1 year ago

https://github.com/lqzhgood/wechat-need-web/issues/4 same as

lqzhgood commented 1 year ago

研究了一下,核心点在于规范并未明确多条规则匹配时浏览器的处理方式,也不能算 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 commented 11 months ago

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

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

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

lqzhgood commented 11 months ago

@dev-techmoe 文档内有~

lqzhgood commented 11 months ago

放到 Releases 里去了