也是最近几周的事情,Firefox 扩展大批量出现无法使用的情况,给用户的感觉是莫名其妙:
![](https://img.haomeiwen.com/i16447112/ad80635d0edc92c3.png)
像我这种还停留在 firefox 55 的老用户,也是莫名惊诧!原先使用的 adblock 以及 Adblock u 都无法使用了,广告铺面而来,那空气,糟透了。
据说原因是 firefox 的证书过期了,导致一部分扩展跟着倒霉。
还好,官方的反应还是快:
![](https://img.haomeiwen.com/i16447112/cbb1f65d9e43f82a.png)
![](https://img.haomeiwen.com/i16447112/689954e7b7727e79.png)
同样,也给出了解决办法——升级到 firefox 66.0.4。
或者,不想升级的,使用特殊版本可以设置:
![](https://img.haomeiwen.com/i16447112/ef2576c5e08691c8.png)
如果愿意升级的话,看到这里就算完了吧。
如果你是通用版,且不愿意升级。那么还有两个临时解决方案。
其一、启用插件调试模式临时使用插件:
以 AdblockU 和 脚本之家为例:
![](https://img.haomeiwen.com/i16447112/0b0333a24698bfc8.png)
在地址栏键入“about:debugging”
![](https://img.haomeiwen.com/i16447112/68d8eec3cbb163f7.png)
启用启动附加组件调试:
![](https://img.haomeiwen.com/i16447112/66bac4535eabfc5a.png)
在
C:\Users\<Username>\AppData\Roaming\Mozilla\Firefox\Profiles\<example text>.default\extensions
文件夹中找到被禁用的 扩展,这里是 adblockultimate:
![](https://img.haomeiwen.com/i16447112/83b0b92fe82b06c1.png)
点击确定,然后就 OK了。
![](https://img.haomeiwen.com/i16447112/cf724f0c7eea1506.png)
让我们看下启用后的状态:
![](https://img.haomeiwen.com/i16447112/45efc09fc3c84e1f.png)
不过这种方法 仅仅在 浏览器浏览时生效,一旦重启浏览器,就又需要重新启用了。
其二,还有一个时间稍微长点的办法(此方法启动可以直接启用所有证书问题无法使用的扩展),据作者说24小时需要重新做一次,为什么是24 小时,我也不太明白,可能是 firefox 更新的计划任务吗?
按下组合键:
ctrl-shift-J
调用 firefox 控制台:
![](https://img.haomeiwen.com/i16447112/039e733ab737c1ac.png)
根据你的版本选择临时启用的代码:
v56 版本及其下,比如我的是 ff 55:
async function set_addons_as_signed() {
Components.utils.import("resource://gre/modules/addons/XPIProvider.jsm");
Components.utils.import("resource://gre/modules/AddonManager.jsm");
let XPIDatabase = this.XPIInternal.XPIDatabase;
let addons = await XPIDatabase.getAddonList(a => true);
for (let addon of addons) {
// The add-on might have vanished, we'll catch that on the next startup
if (!addon._sourceBundle.exists())
continue;
if( addon.signedState != AddonManager.SIGNEDSTATE_UNKNOWN )
continue;
addon.signedState = AddonManager.SIGNEDSTATE_NOT_REQUIRED;
AddonManagerPrivate.callAddonListeners("onPropertyChanged",
addon.wrapper,
["signedState"]);
await XPIProvider.updateAddonDisabledState(addon);
}
XPIDatabase.saveChanges();
}
set_addons_as_signed();
v57 版本及以上:
// Re-enable *all* extensions
async function set_addons_as_signed() {
Components.utils.import("resource://gre/modules/addons/XPIDatabase.jsm");
Components.utils.import("resource://gre/modules/AddonManager.jsm");
let addons = await XPIDatabase.getAddonList(a => true);
for (let addon of addons) {
// The add-on might have vanished, we'll catch that on the next startup
if (!addon._sourceBundle.exists())
continue;
if( addon.signedState != AddonManager.SIGNEDSTATE_UNKNOWN )
continue;
addon.signedState = AddonManager.SIGNEDSTATE_NOT_REQUIRED;
AddonManagerPrivate.callAddonListeners("onPropertyChanged",
addon.wrapper,
["signedState"]);
await XPIDatabase.updateAddonDisabledState(addon);
}
XPIDatabase.saveChanges();
}
set_addons_as_signed();
![](https://img.haomeiwen.com/i16447112/e9d4e337a161d0c8.png)
回车后 后运行
![](https://img.haomeiwen.com/i16447112/126ab1c5c0a386ae.png)
![](https://img.haomeiwen.com/i16447112/054776101f03c939.png)
需要注意的是后面两种办法都只适合临时启用扩展,如果想一劳永逸,那还是直接升级到 firefox 66.0.4 及以上吧!
网友评论