破解扩展文件以使其与Firefox版本兼容

A well known drawback in using Firefox is the problem with extension compatibility when a new major version is released. Whether it is for a new extension that you are trying for the first time or an old favorite we have a way to get those extensions working for you again.

使用Firefox的一个众所周知的缺点是发布新的主要版本时存在扩展兼容性问题。 无论是您是第一次尝试使用新的扩展程序还是旧的收藏夹,我们都可以让这些扩展程序再次为您工作。

There are multiple reasons why you might want to choose this method to fix a non-compatible extension:

出于多种原因,您可能想选择此方法来修复不兼容的扩展名:

  • You are uncomfortable with tweaking the “about:config” settings

    您不满意调整“ about:config”设置
  • You prefer to maintain the original “about:config” settings in a pristine state and like having compatibility checking active

    您更喜欢将原始的“ about:config”设置保持在原始状态,就像启用兼容性检查一样
  • You are looking to gain some “geek cred”

    您正在寻求获得一些“怪胎信誉”

Keep in mind that most extensions will work perfectly well with a new version of Firefox and simply have the “version compatibility number” problem. But once in a while there may be one that needs to have some work done on it by the extension’s author.

请记住,大多数扩展程序都可以与新版本的Firefox完美配合,并且仅存在“版本兼容性编号”问题。 但是有时候,扩展的作者可能需要做一些工作。

The Problem

问题

Here is a perfect example of everyone’s least favorite “extension message”. This is the last thing that you need when all that you want is for your favorite extension (or a new one) to work on a fresh clean install.

这是每个人最不喜欢的“扩展信息”的完美示例。 这是您最需要的,这是您最喜欢的扩展(或新扩展)进行全新安装时所需要的。

Note: This works nicely to “replace” non-compatible extensions already present in your browser if you are simply upgrading.

注意:如果您只是升级,这很好地用于“替换”浏览器中已经存在的不兼容扩展。

xpi-file-hack-01

Hacking the XPI File

破解XPI文件

For this procedure you will need to manually download the extension to your hard-drive (right click on the extension’s “Install Button” and select “Save As”). Once you have done that you are ready to start hacking the extension.

对于此过程,您将需要手动将扩展程序下载到硬盘驱动器(右键单击扩展程序的“安装按钮”,然后选择“另存为”)。 完成后,就可以开始破解扩展程序了。

xpi-file-hack-00

For our example we chose the “GCal Popup Extension”. The best thing to do is place the extension in a new folder (i.e. the Desktop or other convenient location) then unzip it just the same way that you would with any regular zip file.

对于我们的示例,我们选择“ GCal Popup Extension”。 最好的办法是将扩展名放置在新文件夹(即桌面或其他方便的位置)中,然后以与使用任何常规zip文件相同的方式将其解压缩。

Note: HTG reader Dante pointed out that if you do not have a third party zip utility such as IZArc or 7-Zip installed changing the “.xpi” file extension to “.zip” will allow you to use Windows integrated zip software to unzip the file.

注意:HTG阅读器Dante指出,如果您没有安装第三方zip实用程序(例如IZArc或7-Zip),则将“ .xpi”文件扩展名更改为“ .zip”将允许您使用Windows集成的zip软件进行解压缩文件。

Once it is unzipped you will see the various folders and files that were in the “xpi file” (we had four files here but depending on the extension the number may vary). There is only one file that you need to focus on…the “install.rdf” file.

解压缩后,您将看到“ xpi文件”中的各种文件夹和文件(我们在这里有四个文件,但取决于扩展名,数量可能有所不同)。 您只需要关注一个文件……“ install.rdf”文件。

Note: At this point you should move the original extension file to a different location (i.e. outside of the folder) so that it is no longer present.

注意:此时,您应该将原始扩展名文件移动到其他位置(即文件夹外部),以使其不再存在。

xpi-file-hack-02

Open the file in “Notepad” so that you can change the number for the “maxVersion”. Here the number is listed as “3.5.*” but we needed to make it higher…

在“记事本”中打开文件,以便您可以更改“ maxVersion”的编号。 这里的数字被列为“ 3.5。*”,但我们需要提高它的数量…

xpi-file-hack-03

Replacing the “5” with a “7” is all that we needed to do. Once you have entered your new “maxVersion” number save the file.

我们要做的就是将“ 5”替换为“ 7”。 输入新的“ maxVersion”编号后,保存文件。

xpi-file-hack-04

At this point you will need to re-zip all of the files back into a single file. Make certain that you “create” a file with the “.zip file extension” otherwise this will not work.

此时,您将需要将所有文件重新压缩回单个文件。 确保您以“ .zip文件扩展名”“创建”文件,否则将无法使用。

xpi-file-hack-05

Once you have the new zip file created you will need to rename the entire file including the “file extension”. For our example we copied and pasted the original extension name.

一旦创建了新的zip文件,您将需要重命名整个文件,包括“文件扩展名”。 对于我们的示例,我们复制并粘贴了原始扩展名。

xpi-file-hack-06

Once you have changed the name click outside of the “text area”. You will see a small message window like this asking for confirmation…click “Yes” to finish the process.

更改名称后,在“文本区域”之外单击。 您将看到一个类似这样的小消息窗口,要求您确认……单击“是”以完成该过程。

xpi-file-hack-07

Now your modified/updated extension is ready to install.

现在,您已修改/更新的扩展程序就可以安装了。

xpi-file-hack-08

Drag the extension into your browser to install it and watch that wonderful “Restart to complete the installation.” message appear.

将扩展程序拖到浏览器中进行安装,然后观看精彩的“重新启动以完成安装”。 消息出现。

xpi-file-hack-09

As soon as your browser starts you can check the “Add-ons Manager Window” and see the version compatibility numbers for the extension. Looking very very nice!

浏览器启动后,您可以检查“附加组件管理器窗口”,并查看扩展的版本兼容性编号。 看起来非常非常好!

xpi-file-hack-10

And just like that your extension should be up and running without any problems.

就像您的扩展程序应该启动并正常运行一样。

xpi-file-hack-11

Conclusion

结论

If you are looking to try something new, gain some geek cred, or just want to keep your Firefox install as close to the original condition as possible this method should get those extensions working nicely for you again.

如果您想尝试一些新的东西,获得一些极客的信誉,或者只想使Firefox安装尽可能接近原始状态,则此方法应使这些扩展名再次适合您。

翻译自: https://www.howtogeek.com/howto/11869/hack-extension-files-to-make-them-version-compatible-for-firefox/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值