如何在本地测试Firefox插件 [英] How to test firefox plugin locally
问题描述
另一个我试过的方法是使用或 Firefox每晚。您还应该仔细注意您需要使用哪种Firefox版本。这些信息包含在MDN文档页面的浏览器兼容性部分中。
$ b
Firefox附加SDK
<要测试基于Firefox附加SDK的附加组件,请使用
jpm run
。你可能想看一下这个回答jpm run不适用于Firefox 48或更高版本。 p> I have a basic Google Chrome extension which needs to be ported to Firefox. I uploaded the .crx file to the Firefox marketplace and it got accepted but is under review rightnow. I downloaded the the generated xpi file and tried to install it locally but without any success. It tell that the plugin is invalid or corrupted.
Another method that I tried is I ported the extension using chrome-tailor and generated the xpi. I am able to install the extension in this but the content scripts are not injected and the extension doesn't work as expected.
I want to install it in Firefox and test it. I have also set xpinstall.signatures.required
to false
.
WebExtensions
To test WebExtension based add-ons, they are usually loaded as a "Temporary Installation in Firefox"
That MDN page describes how to temporarily install a WebExtensions (i.e. similar code to Chrome) in Firefox. The gist of it is:
- Navigate to
about:debugging
- Click the button "Load Temporary Add-on"
- Use the file selection dialog to select the manifest.json file, or packaged .xpi file for the extension.
Note on testing WebExtensions:
The WebExtensions API is still in development. For now, you are probably best off developing and testing your WebExtension add-on with Firefox Developer Edition, or Firefox Nightly. You should also make careful note of what version of Firefox is required for the functionality you desire to use. This information is contained in the "Browser compatibility" section of the MDN documentation pages.
Firefox Add-on SDK
To test Firefox Add-on SDK based ad-ons, use jpm run
. You might want to take a look at this answer to "jpm run does NOT work with Firefox 48, or later"
这篇关于如何在本地测试Firefox插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!