火狐扩展教程_Firefox扩展模板

火狐扩展教程

Creating a Firefox extension can be difficult if you don't know the files involved and how to structure your extension folder. Fear not -- I have created a very basic Firefox extension template file/folder structure for you to get your first plugin going.

如果您不知道所涉及的文件以及如何构造扩展文件夹,则创建Firefox扩展可能会很困难。 不用担心-我为您创建了一个非常基本的Firefox扩展模板文件/文件夹结构,以使您的第一个插件正常运行。

文件和文件夹结构 (File & Folder Structure)

  • MyExtension/

    MyExtension /

        • myExtension.xul - The XML that creates the layout of the extension.

          myExtension.xul-创建扩展布局的XML。
        • Empty for this template.此模板为空
        • myExtension.js - The JavaScript that manages the action of each extension object.

          myExtension.js-管理每个扩展对象的动作JavaScript。
      • locale/ - contains language files. None included in this template. Assume English.
      • locale / -包含语言文件。 没有包含在此模板中。 假设英语。
      • skin/ - contains images and CSS to control extension object layout.

        skin / -包含用于控制扩展对象布局的图像和CSS。
        • myExtension.css - a CSS file controling presentation, just like a website.

          myExtension.css-一个CSS文件控制演示文稿,就像一个网站一样。
        • logo.png - a sample image. All images go in this folder as well.

          logo.png-示例图像。 所有图像也都放在此文件夹中。
  • chrome.manifest - maps out the file/structure layout of the extension for Firefox.

    chrome.manifest-映射Firefox扩展的文件/结构布局。

  • install.rdf - provides information about the extension.

    install.rdf-提供有关扩展的信息。

  • update.rdf - gets pinged to check for extension updates.

    update.rdf-被ping检查扩展名更新。

Note that this structure isn't required but is a very commonly used structure. Also, make sure to check out my David Walsh Blog Toolbar post to see an example of my file contents.

请注意,此结构不是必需的,但它是非常常用的结构。 另外,请确保查看我的David Walsh博客工具栏帖子,以查看我的文件内容的示例。

Stay tuned for my post on creating the XPI file that packages the extension!

请继续关注我创建打包扩展的XPI文件的帖子!

翻译自: https://davidwalsh.name/firefox-extension-template

火狐扩展教程

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值