How to develop legacy Firefox add-ons in the future?

╄→гoц情女王★ 提交于 2019-12-11 02:37:54

问题


Firefox is moving towards the WebExtensions standard which promises improvements in stability, cross-browser compatibility, and more security. At the same time they're gradually dropping support for legacy add-ons (bootstrapped extensions, add-on SDK, etc.).

Unfortunately, the WebExtension APIs are much less powerful than legacy add-ons which by contrast have full control over the browser. I fully understand the motivation for the switch, but the features my add-on provides just can't possibly work with limited capabilities of a WebExtension.

What are my options to continue developing a legacy add-on with as few cutbacks as possible? How do other add-ons that won't work as a pure WebExtension solve this problem? Are there any niche projects dedicated to maintaining some sort of legacy extension "hack", or will I have to heavily modify Firefox myself to get any legacy add-ons installed in the future?

(I'm aware that I won't be able to submit my add-on to AMO or get it signed by Mozilla and that supporting full extensions is a potential security risk. But since my add-on is targeting a tech-savvy audience, I'm not too concerned about moderately complex workarounds.)


回答1:


As the magic 8 ball says: "Cannot predict now".

The reality is that we don't know yet what is going to be required to continue to run non-WebExtensions based add-ons past the release of Firefox 57. All we know is that Mozilla has stated that for Firefox 57:

  • Firefox will only run WebExtensions.
  • AMO will continue to support listing and updating legacy add-ons after the release of 57 in order to have an easier transition. The exact cut-off time for this support hasn’t been determined yet.

It had previously been stated that the restriction to WebExtensions-only would only apply to the Release and Beta channels, so:

It may be possible to continue to run non-WebExtension based add-ons on:

  • Developer Edition
  • Nightly
  • Unbranded Release and Beta (unknown status)

It is currently unclear if these will actually be possibilities. If they will be possibilities, it is unclear for how long it will remain possible for older add-ons to function (both due to changes to Firefox and/or non-WebExtensions being intentionally disabled). The fact that AMO will continue to support listing and updates to non-WebExtension add-ons is an encouraging sign that we will still be able to use them in Firefox releases that are not the main Release and Beta channels.

Other options include:

  • The Firefox ESR 52 release. The pattern is that this would be supported through the normal release of Firefox 60, or so. Personally, I feel that Mozilla should plan to have an ESR release prior to any major changes in functionality (i.e. have a Firefox 56 ESR), but that does not appear to be how Mozilla does things.
  • The various forks that have been made of Firefox. Each fork would have to be checked to see what their plans are for this change.
  • Any new fork made specifically to continue to support non-WebExtension add-ons.
  • A hack may be determined to re-enable non-WebExtension support, similar to the one that exists to disable checking for add-on signing.

You should keep in mind that the plans are for Firefox to fundamentally change in the future. A significant reason for moving away from the more capable add-on types (non-WebExtensions based extensions along with complete-themes) is to allow Firefox to be changed without the need to consider maintaining compatibility with more capable add-ons which rely on the internals of Firefox for their operation. When, exactly, these breaking changes will be rolled out is unclear.

Personally, I'm in a similar boat. None of my released add-ons are possible to move to WebExtensions. Many of the other add-ons which I use are clearly not possible to move to WebExtensions. Frankly, I'm not looking forward to using Firefox without the capabilities some of those add-ons provide. Thus, I will be continuing to look at what options are available as we get closer to Firefox 57.

However, even if I find no option to use more capable add-ons after Firefox 52 ESR is EOL'ed, I may continue to use Firefox. My primary reason for doing so instead of switching to Chrome would be the fact that Firefox extensions go through a review process, whereas Chrome extensions released though the Chrome store can be very bad from the point of view of both security and privacy.




回答2:


Regarding your question:

Are there any niche projects dedicated to maintaining some sort of legacy >extension "hack", or will I have to heavily modify Firefox myself to get any >legacy add-ons installed in the future?

Besides the previously said FF52ESR, at least, there are 2 alive projects based in Firefox code that are focused in keeping compatibility with legacy extensions.

  • Waterfox 56 (updated and compatible with legacy addons and webextensions)

  • Basilisk 201804 (updated and based in FF52, targeting v55)

On the other hand you have Palemoon 27.x which also is still under support but it is based in pre Australis FF interface, so it will be compatible with old-legacy addons.




回答3:


Download and install latest Nightly Firefox (https://www.mozilla.org/en-US/firefox/58.0a1/releasenotes) (you can right click on the icon, hit Properties, and then add -no-remote -p to the Target address, as in "C:\Program Files\Nightly\firefox.exe" -no-remote -p which will then enable you to use more than one Profile)

In about:config (paste in address bar and hit Enter key) look for extensions.legacy.enabled and right click and toggle it to true in.

Download "anyway" the latest development version of TMP, (https://addons.mozilla.org/en-US/firefox/addon/tab-mix-plus/versions/0.5.0.5pre.171027a1) to your download folder (since Nighlty will not install it normally), then under File go to Open File and navigate to that file (with the /xpi extension) in your download folder, and install it, and restart Nightly.

Unlikely that this will work with the standard Firefox 57+ release, but TMP developer is working on the require rewrite. May God help him.



来源:https://stackoverflow.com/questions/42562445/how-to-develop-legacy-firefox-add-ons-in-the-future

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!