火狐扩展教程
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文件的帖子!
火狐扩展教程