Repository navigation
Firefox WebExtensions
uBO/webext 的稳定版早在 2017 年 9 月就在 AMO 上发布了,兼容 Firefox 52 及更高版本。对于 Firefox 52,uBO/webext 部分功能可能会被禁用。
uBO/webext 最适合 Firefox 57 及更高版本,并开启多进程功能时使用。
有许多用户报告说使用时遇到部分网站无法正常显示,或图片无法正常加载等问题。我发现其中有许多问题是由于在 uBO/webext 以外还使用了一些旧式扩展。例如,在 GreaseMonkey 里开启了 Reek's AAK 脚本导致 图片无法载入。
如果遇到这类问题,你必须禁用所有旧式扩展看看问题是否解决。如果问题解决,你再一个一个启用旧式扩展来查找是哪个扩展引起的问题。
部分旧式扩展会导致浏览器禁用多进程模式,显然多进程被关闭后会产生许多页面载入失败问题。
Update (2018-06-30): if you experience above problems in Waterfox then this problem will probably be fixed in next Waterfox release (56.2.2-56.3?)
所有扩展都在逐步过渡到 WebExtensions,现在正是你开启弃用旧式扩展的好时机,毕竟再过几周 Firefox 57 发布时就将停止支持旧式扩展。不妨看看你的旧式扩展里是否有对应的 beta webext 版本,例如这里就有AMO 上的 beta webext 版本的 Greasemonkey。
还有一些特定的 webext 扩展会导致 Firefox 无法正确载入页面:
-
Extension with listener at webRequest.onHeadersReceived breaks navigation (crash/blank page) when the previous page performs sync XHR upon unload
- duplicate of 1396395 - Firefox crashes when submitting form - RESOLVED FIXED in Firefox 58
-
Empty page using uBo / ABP webext (even whitelisting the site)
- duplicate of 1379148 - document.write does not synchronously modify a document if an extension has content scripts at document_start - VERIFIED FIXED in Firefox 57
- Presence of an Webextension makes the head element missing on (iframe) load
另一个选择是安装 uBO 1.13.8 并取消它的自动更新功能。
你是否有遇到每次重启浏览器后 uBO 的缓存数据都被清空的情况?不妨看看这篇帖子http://forums.mozillazine.org/viewtopic.php?f=9&t=3034189是否有帮助。
Update (2018-06-30): if you still have problems with filter list being out of date on every restart check this Mozilla bug 944918 - indexedDB broken - UnknownError - Error opening Database In overall your IndexedDB database may be corrupted (in various ways) and only way to fix this is to find database folder and remove it. One special case of "corruption" may appear when you browse database folders and you file explorer drops hidden files in database directory (for example .directory dropped by Dolphin in KDE) - deleting these unwanted files will fix the problem.
Firefox for Android 56: 你可以使用 “uBlock Origin” 的菜单项来访问弹出面板,但无法通过 about:addons 访问控制面板。该问题已在 Android 57 得到修复。目前版本的临时解决办法是通过 uBO 的弹出面板来打开控制面板。一旦你打开了控制面板,你可以创建一个书签方便以后直接访问它。
Firefox for Android 55: 根据文档说明,只有 Firefox 55 (beta) 版本才允许你直接打开 uBO 的弹出面板。
-
script:contains过滤规则会失效- uBO 自带的规则列表早就停止依靠这种规则语法解决所报告的过滤问题。
-
修饰规则不再使用浏览器的用户样式已在 f32868766340e2fb8ec689f4b5683a413de847b6 中修复 - uBO/webext 访问后台网络请求的能力受到限制,相比之下 uBO/legacy 可以完全访问所有后台网络请求。例如,你无法看到(和屏蔽)其他扩展建立的网络请求。相关的 bug 说明参见:"Support moz-extension: urls in MatchPattern"。
对于所有基于 Firefox 52 及以下版本的 Firefox 及其衍生浏览器,来自 https://addons.mozilla.org/ 的 uBO 将无法使用,想继续使用 uBO 开发版本的用户都必须手动安装这个 xpi 版本。
就在写作本文时,我还没有计划停止开发 uBO/legacy 版本。但做一番假设,如果继续维护旧版变得不轻松的话,或许未来某个时候计划会有所改变。
我不希望使用旧版本 Firefox 的用户测试并汇报 uBO 的问题,因为我没有时间对所有老版本 Firefox 的用户进行测试。
如果你还是想使用 uBO/legacy 版本,这里有一个志愿者创建了一个扩展,允许 uBO/webext 实现自动更新:https://github.com/JustOff/ublock0-updater.
Issue #2795 集合了当前一系列 bugzilla.mozilla.org 上只影响 uBO/webext 版本的问题。
记得备份你的 uBO 设置,如果从 uBO/legacy 转换到 uBO/webext 失败了,你还可以从备份的文件还原所有设置(参见 控制面板的 设置 版块里的备份/还原功能)。
[1]: 2018-06-30 updates and solution for "corrupted database" problem thanks to grahamperrin message
uBlock Origin - 一款支持 Chromium、Firefox 和 Safari 的高效过滤工具,快速且简洁