difference between creating firefox addon using sd

2019-05-21 19:04发布

I have just started creating firefox add-on. So I have downloaded sdk and successfully created sample add-on, and its directories are like this

  • data
  • doc
    • main.md
  • lib
    • main.js
  • test
    • test-main.js
  • package.json
  • readme.md

But When I search for how to develop add-on for firefox from scratch it is showing some like this https://blog.mozilla.org/addons/2009/01/28/how-to-develop-a-firefox-extension/

Directory structure

http://blog.mozilla.org/addons/files/2009/01/extension-structure.png

Can any one help me for this. Where to start and how to develop firefox add-on from scratch.

2条回答
Rolldiameter
2楼-- · 2019-05-21 19:39

What do you want to make? Addon without sdk is what I prefer because I have control over everything. But with SDK i don't know how its doing what and it comes with overhead of at least the library size.

What are you tyring to do? Ill show u example in both sdk and bootstrapped.

SDK codde in your main module is much shorter though, but much less control, can't do simple stuff often times.

查看更多
forever°为你锁心
3楼-- · 2019-05-21 19:44

Using the SDK is easier, but as @Noit pointed out, limited in some respects. If you want to modify web pages, I recommend the SDK. If you want to make significant changes to the browser UI itself, you should bootstrap. If you don't have any experience with either, the SDK will be much easier to get started with.

Here are all the resources you need to get started. All the documentation for the SDK can be found on the sidebar of that page (look at the Guide for more in-depth info, click on High Level APIs for information on specific modules).

When searching for and reading resources, make sure that what you're reading is for the Add-on SDK (used to be called Jetpack) and not for bootstrapped add-ons.

查看更多
登录 后发表回答