aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/extensions
diff options
context:
space:
mode:
Diffstat (limited to 'files/zh-cn/extensions')
-rw-r--r--files/zh-cn/extensions/firefox/index.html11
-rw-r--r--files/zh-cn/extensions/index.html140
-rw-r--r--files/zh-cn/extensions/mobile/index.html76
-rw-r--r--files/zh-cn/extensions/引导型扩展/index.html369
4 files changed, 0 insertions, 596 deletions
diff --git a/files/zh-cn/extensions/firefox/index.html b/files/zh-cn/extensions/firefox/index.html
deleted file mode 100644
index 9bbac87b84..0000000000
--- a/files/zh-cn/extensions/firefox/index.html
+++ /dev/null
@@ -1,11 +0,0 @@
----
-title: Firefox
-slug: Extensions/Firefox
-translation_of: Mozilla/Add-ons
----
-<p>The following articles provide help with developing extensions for Firefox. In addition, please refer to the <a class="internal" href="/en/Extensions" title="En/Extensions">general extension documentation</a> that applies to all Mozilla applications. In the future, you may also develop extensions with an alternative, trimmed down but simpler API developed at <a class="link-https" href="https://jetpack.mozillalabs.com/" title="https://jetpack.mozillalabs.com/">Mozilla labs' Jetpack project</a>.</p>
-<table class="topicpage-table"> <tbody> <tr> <td> <h4 id="Documentation" name="Documentation">Documentation</h4> <ul> <li><a class="internal" href="/En/Firefox_addons_developer_guide" title="En/Firefox_addons_developer_guide">Firefox add-ons developer guide</a> An introductory guide to add-on development for Firefox.</li> <li><a class="internal" href="/en/Creating_Custom_Firefox_Extensions_with_the_Mozilla_Build_System" title="en/Creating_Custom_Firefox_Extensions_with_the_Mozilla_Build_System">Creating Custom Firefox extensions with the Mozilla build system</a> How to set up the build environment for an extension that makes use of binary components.</li> <li><a class="internal" href="/en/Building_an_Extension" title="en/Building_an_Extension">Building a Firefox extension</a> Explains step by step how to build an extension for Firefox.</li> <li><a class="internal" href="/en/Updating_extensions_for_Firefox_3.6" title="en/Updating extensions for Firefox 3.6">Updating extensions for Firefox 3.6</a> lists the known changes in Firefox 3.6 that affect extensions. Includes links to the documentation you'll need to get up to date.</li> <li><a class="internal" href="/En/Updating_extensions_for_Firefox_3.5" title="en/Updating extensions for Firefox 3.5">Updating extensions for Firefox 3.5</a> Lists the known changes in Firefox 3.5 that affect extensions with pointers to the relevant documentation.</li> <li><a class="internal" href="/en/Updating_extensions_for_Firefox_3" title="en/Updating extensions for Firefox 3">Updating extensions for Firefox 3</a> Lists the known changes in Firefox 3 that affect extensions with pointers to the relevant documentation.</li> <li><a class="internal" href="/en/Code_snippets" title="en/Code_snippets">Firefox code snippets</a> Code commonly used by many extensions.</li> </ul> </td> <td> <h4 id="Community" name="Community">Community</h4> <ul> <li>View Mozilla forums...</li> </ul> <p>{{ DiscussionList("dev-extensions", "mozilla.dev.extensions") }}</p> <ul> <li><a class="link-irc" href="irc://moznet/#extdev">#extdev IRC channel</a></li> <li><a class="external" href="http://forums.mozillazine.org/viewforum.php?f=19">MozillaZine forum</a></li> <li><a class="external" href="http://mozdev.org/mailman/listinfo/project_owners">mozdev project owners</a></li> <li><a href="/en/Extensions/Community" title="en/Extensions/Community">Other community links...</a></li> </ul> <h4 id="Tools" name="Tools">Tools</h4> <ul> <li><a class="link-https" href="https://addons.mozilla.org/en-US/firefox/addon/6622" rel="external nofollow" title="https://addons.mozilla.org/en-US/firefox/addon/6622">DOM Inspector</a> edit the live DOM  (Firefox and Thunderbird)</li> <li><a class="external" href="http://www.hacksrus.com/~ginda/venkman/" rel="external nofollow" title="http://www.hacksrus.com/~ginda/venkman/">Venkman</a>, a JavaScript debugger (<a class="external" href="http://addons.mozilla.org/en-US/firefox/addon/216" rel="external nofollow" title="http://addons.mozilla.org/en-US/firefox/addon/216">Firefox</a>, <a class="external" href="http://addons.mozilla.org/en-US/thunderbird/addon/216" rel="external nofollow" title="http://addons.mozilla.org/en-US/thunderbird/addon/216">Thunderbird</a>)</li> <li><a class="link-https" href="https://addons.mozilla.org/en-US/firefox/addon/7434/" rel="external nofollow" title="https://addons.mozilla.org/en-US/firefox/addon/7434/">Extension Developer's Extension</a> a suite of development tools</li> <li><a class="external" href="http://www.gijsk.com/" rel="external nofollow" title="http://www.gijsk.com/">Chrome List</a> view files in chrome:// (<a class="external" href="http://addons.mozilla.org/en-US/firefox/addon/4453" rel="external nofollow" title="http://addons.mozilla.org/en-US/firefox/addon/4453">Firefox</a>, <a class="external" href="http://addons.mozilla.org/en-US/thunderbird/addon/4453" rel="external nofollow" title="http://addons.mozilla.org/en-US/thunderbird/addon/4453">Thunderbird</a>)</li> <li><a class="external" href="http://ted.mielczarek.org/code/mozilla/extensionwiz/" rel="external nofollow" title="http://ted.mielczarek.org/code/mozilla/extensionwiz/">Extension Wizard</a> a web-based extension skeleton generator (Firefox and Thunderbird)</li> </ul> ... <a class="internal" href="/en/Setting_up_extension_development_environment#Development_extensions" title="en/Setting up extension development environment#Development extensions">more tools</a> ... <p><span class="alllinks"><a href="/Special:Tags?tag=Extensions:Tools&amp;language=en" title="Special:Tags?tag=Extensions:Tools&amp;language=en">View All...</a></span></p> <h4 id="Related_Topics" name="Related_Topics">Related Topics</h4> <dl> <dd><a href="/en/XUL" title="en/XUL">XUL</a>, <a href="/en/JavaScript" title="en/JavaScript">JavaScript</a>, <a href="/en/XPCOM" title="en/XPCOM">XPCOM</a>, <a href="/en/Themes" title="en/Themes">Themes</a>, <a href="/En/Developer_Guide" title="en/Developing_Mozilla">Developing Mozilla</a></dd> </dl> </td> </tr> </tbody>
-</table>
-<div class="noinclude">
-<p>{{ languages( { "ja": "ja/Extensions/Firefox" } ) }}</p>
-</div>
diff --git a/files/zh-cn/extensions/index.html b/files/zh-cn/extensions/index.html
deleted file mode 100644
index 7dbf1a691f..0000000000
--- a/files/zh-cn/extensions/index.html
+++ /dev/null
@@ -1,140 +0,0 @@
----
-title: 扩展
-slug: Extensions
-tags:
- - Extensions
- - 扩展
-translation_of: Mozilla/Add-ons
----
-<div class="callout-box">
- <strong><a href="/zh-CN/docs/构建一个扩展" title="zh-CN/构建一个扩展">构建一个扩展</a></strong><br>
- 一步步地了解如何为 Firefox 构建一个扩展。</div>
-<div>
- <p><strong>扩展</strong>是能为 Mozilla 程序(例如 Firefox、Seamonkey和 Thunderbird)添加新功能的小巧的附加软件。从工具栏按钮到全新特性,它们能添加任何东西。它们允许用户定制程序,以适合自己的个性需要(如果他们需要新的特性);同时又保持了程序的小巧,方便下载。</p>
- <p>扩展不同于<a href="/zh-CN/docs/插件" title="zh-CN/插件">插件</a>,插件帮助浏览器现实类似于播放多媒体文件这样的特定的内容。扩展也不同于搜索插件,搜索插件在搜索栏插入附加的搜索引擎。</p>
-</div>
-<p><span class="comment">基本取自于 Mozilla Update 中国,但是也有不少修改的地方。</span></p>
-<table class="topicpage-table">
- <tbody>
- <tr>
- <td>
- <h2 class="Documentation" id="Documentation" name="Documentation">文档</h2>
- <p> </p>
- <h3 id="常规_(适用于全部_Mozilla_应用程序)">常规 <small>(适用于全部 Mozilla 应用程序)</small></h3>
- <dl>
- <dt>
- <a class="external" href="http://kb.mozillazine.org/Setting_up_extension_development_environment">设置扩展的开发环境</a></dt>
- <dd>
- <small>一些可以令开发扩展更容易的设置的精华提示。</small></dd>
- <dt>
- <a href="https://developer.mozilla.org/zh-CN/docs/Extensions/Bootstrapped_extensions" title="Extensions/Bootstrapped extensions">引导式扩展</a> {{gecko_minversion_inline("2.0")}}</dt>
- <dd>
- 介绍创建无需重启即可被安装、卸载和升级的扩展的方法。</dd>
- <dt>
- <a href="https://developer.mozilla.org/zh-CN/docs/XUL_School" title="XUL School">XUL 学习教程</a></dt>
- <dd>
- <span class="short_text" id="result_box" lang="zh-CN"><span>一个全面的</span><span>扩展开发</span><span>教程</span><span>。</span></span></dd>
- <dt>
- <a class="internal" href="/zh-CN/docs/构建一个扩展" title="zh-CN/构建一个扩展">构建一个扩展</a></dt>
- <dd>
- <small>一步步地阐述如何创建一个扩展。</small></dd>
- <dt>
- <a href="/zh-CN/docs/扩展/内嵌选项" title="Extensions/Inline Options">内嵌选项</a></dt>
- <dt>
- {{gecko_minversion_inline("7.0")}}</dt>
- <dd>
- 介绍如何自定义在Firefox 7开始出现的内嵌在附加组件管理器窗口中的新用户界面。</dd>
- <dt>
- <a href="https://developer.mozilla.org/zh-CN/docs/Security_best_practices_in_extensions" title="Security best practices in extensions">扩展安全性指导(英)</a></dt>
- <dd>
- <span class="short_text" id="result_box" lang="zh-CN"><span>指导开发人员</span><span>,以确保</span><span>用户</span><span>扩展</span><span>的安全性</span><span>。</span></span></dd>
- <dt>
- <a href="https://developer.mozilla.org/zh-CN/docs/Extensions/Performance_best_practices_in_extensions" title="Extensions/Performance best practices in extensions">扩展性能指导(英)</a></dt>
- <dd>
- 介绍如何创建优质且高效的扩展。</dd>
- <dt>
- <a href="https://developer.mozilla.org/zh-CN/docs/Extensions/Extension_etiquette" title="Extensions/Extension etiquette">扩展用户体验指导(英)</a></dt>
- <dd>
- 通用的尽可能提高扩展用户体验的做法。</dd>
- <dt>
- <a href="/zh-CN/docs/扩展打包" title="zh-CN/扩展打包">扩展打包</a></dt>
- <dd>
- <small>如何把你的 Firefox 扩展打包,以供下载和安装。</small></dd>
- <dt>
- <a href="/zh-CN/docs/XUL" title="XUL">XUL</a></dt>
- <dd>
- 介绍用于描述Mozilla扩展用户界面的XUL标记语言。</dd>
- <dt>
- <a href="https://developer.mozilla.org/zh-CN/docs/Performance" title="Performance">性能(英)</a></dt>
- <dd>
- 提供一些帮助你提高附加组件性能(且体验良好)的指导和工具。</dd>
- <dt>
- <a href="https://developer.mozilla.org/zh-CN/docs/Installing_extensions" title="Installing_extensions">安装扩展(英)</a></dt>
- <dd>
- <span class="short_text" id="result_box" lang="zh-CN"><span>介绍如何以编程方式</span><span>安装扩展。</span></span></dd>
- <dt>
- <a href="https://developer.mozilla.org/zh-CN/docs/Submitting_an_add-on_to_AMO" title="Submitting_an_add-on_to_AMO">提交附加组件到AMO(英)</a></dt>
- <dd>
- <span class="short_text" id="result_box" lang="zh-CN"><span>如何</span><span class="alt-edited">发布你的附加组件</span><span class="alt-edited">到</span><span>AMO</span><span>上</span><span>。</span></span></dd>
- <dt>
- <a href="/zh-CN/docs/Extension_Frequently_Asked_Questions" title="Extension_Frequently_Asked_Questions">扩展的常见问题解答</a></dt>
- <dd>
- 关于扩展开发的常见问题解答。</dd>
- </dl>
- <h3 id="针对特定程序的指导"><span class="short_text" id="result_box" lang="zh-CN"><span>针对特定程序的指导</span></span></h3>
- <p><a class="internal" href="/zh-CN/docs/Extensions/Firefox" title="zh-CN/docs/Extensions/Firefox"><strong>Firefox(英语)</strong></a></p>
- <p><a class="internal" href="/zh-CN/docs/Extensions/Thunderbird" title="zh-CN/docs/Extensions/Thunderbird"><strong>Thunderbird(英语)</strong></a></p>
- <p><a class="internal" href="/zh-CN/docs/Extensions/SeaMonkey" title="zh-CN/docs/Extensions/SeaMonkey"><strong>SeaMonkey(英语)</strong></a><em><a href="https://developer.mozilla.org/zh-CN/docs/Extensions_support_in_SeaMonkey_2" title="Extensions_support_in_SeaMonkey_2">从SeaMonkey 2起支持扩展</a></em></p>
- <p><strong><a href="https://developer.mozilla.org/zh-CN/docs/Extensions/Mobile" title="Extensions/Firefox_on_Android">Firefox 安卓版</a></strong></p>
- <p><a class="external" href="http://starkravingfinkle.org/blog/2009/05/resources-for-fennec-add-on-developers/" title="http://starkravingfinkle.org/blog/2009/05/resources-for-fennec-add-on-developers/"><strong>Fennec(英语)</strong></a> (移动版火狐)</p>
- <p><span class="alllinks"><a href="/Special:Tags?tag=%E6%89%A9%E5%B1%95&amp;language=zh-cn" title="Special:Tags?tag=扩展&amp;language=zh-cn">查看所有“扩展”标签…</a></span></p>
- <dl>
- </dl>
- </td>
- <td>
- <h2 class="Community" id="Community" name="Community">社区</h2>
- <p><span class="comment">估计相当长时间内都不会被我们中国用户使用的东西,我就省略了。</span></p>
- 查看Mozilla扩展开发论坛{{DiscussionList("dev-extensions", "mozilla.dev.extensions")}}
- <ul>
- <li><a href="http://mozilla.com.cn" title="http://mozilla.com.cn">火狐社区</a></li>
- <li><a href="https://g.mozest.com/forum-24-1" title="https://g.mozest.com/forum-24-1">Mozest社区</a></li>
- <li><a href="http://www.firefox.net.cn/forum/viewforum.php?f=8" title="http://www.firefox.net.cn/forum/viewforum.php?f=8">Mozilla Firefox中文社区</a></li>
- <li><a class="external" href="http://forums.mozillazine.org/viewforum.php?f=19">MozillaZine 论坛(英)</a></li>
- <li><a class="external" href="http://mozdev.org/mailman/listinfo/project_owners">MozDev 项目所有者(英)</a></li>
- <li><a href="http://planet.mozilla.org/" title="http://planet.mozilla.org/">Planet Mozilla(英)</a></li>
- <li><a href="/zh-CN/docs/扩展/社区" title="zh-CN/扩展/社区">其它社区链接…</a></li>
- </ul>
- <h2 class="Tools" id="Tools" name="Tools">工具</h2>
- <ul>
- <li><a href="https://developer.mozilla.org/zh-CN/docs/DOM_Inspector" title="DOM Inspector">DOM检查器</a> - 检查DOM、CSS和XBL (适用于Firefox和Trunderbird)</li>
- <li><a href="http://www.hacksrus.com/%7Eginda/venkman/" rel="external nofollow" title="http://www.hacksrus.com/~ginda/venkman/">Venkman</a> - 一个JavaScript调试器 (<a href="http://addons.mozilla.org/en-US/firefox/addon/216" rel="external nofollow" title="http://addons.mozilla.org/en-US/firefox/addon/216">Firefox</a>,<a href="http://addons.mozilla.org/en-US/thunderbird/addon/216" rel="external nofollow" title="http://addons.mozilla.org/en-US/thunderbird/addon/216">Thunderbird</a>)</li>
- <li><a class="link-https" href="http://builder.addons.mozilla.org/" title="https://builder.mozillalabs.com/">Mozilla Add-on Builder</a></li>
- <li><a class="link-https" href="https://addons.mozilla.org/en-US/firefox/addon/7434/" rel="external nofollow" title="https://addons.mozilla.org/en-US/firefox/addon/7434/">扩展开发者的扩展</a> a suite of development tools</li>
- <li><a href="http://www.gijsk.com/" rel="external nofollow" title="http://www.gijsk.com/">Chrome List</a> view files in chrome:// (<a href="http://addons.mozilla.org/en-US/firefox/addon/4453" rel="external nofollow" title="http://addons.mozilla.org/en-US/firefox/addon/4453">Firefox</a>, <a href="http://addons.mozilla.org/en-US/thunderbird/addon/4453" rel="external nofollow" title="http://addons.mozilla.org/en-US/thunderbird/addon/4453">Thunderbird</a>)</li>
- <li><a href="http://ted.mielczarek.org/code/mozilla/extensionwiz/" rel="external nofollow" title="http://ted.mielczarek.org/code/mozilla/extensionwiz/">Extension Wizard</a> a web-based extension skeleton generator (Firefox and Thunderbird)</li>
- </ul>
- <p>... <a href="https://developer.mozilla.org/zh-CN/docs/Setting_up_extension_development_environment#Development_extensions" title="Setting up extension development environment#Development extensions">more tools</a> ...</p>
- <ul>
- <li><a class="external" href="http://ted.mielczarek.org/code/mozilla/extensiondev/">扩展开发者的扩展</a></li>
- <li><a href="/zh-CN/docs/DOM_Inspector" title="zh-CN/DOM_Inspector">DOM Inspector</a></li>
- <li><a href="/zh-CN/docs/venkman" title="zh-CN/venkman">Venkman</a>, JavaScript 调试器</li>
- </ul>
- <p><span class="alllinks"><a href="/Special:Tags?tag=%E6%89%A9%E5%B1%95:%E5%B7%A5%E5%85%B7&amp;language=zh-cn" title="Special:Tags?tag=扩展:工具&amp;language=zh-cn">查看所有…</a></span></p>
- <h4 id=".E7.9B.B8.E5.85.B3.E9.A1.B5.E9.9D.A2" name=".E7.9B.B8.E5.85.B3.E9.A1.B5.E9.9D.A2">相关页面</h4>
- <ul>
- <li><a href="/Special:Tags?tag=%E6%89%A9%E5%B1%95:%E5%8F%82%E8%80%83&amp;language=zh-cn" title="Special:Tags?tag=扩展:参考&amp;language=zh-cn">参考</a></li>
- <li><a href="/Special:Tags?tag=%E6%89%A9%E5%B1%95:%E6%96%87%E7%AB%A0&amp;language=zh-cn" title="Special:Tags?tag=扩展:文章&amp;language=zh-cn">文章</a></li>
- <li><a href="/Special:Tags?tag=%E6%89%A9%E5%B1%95:%E7%A4%BA%E4%BE%8B&amp;language=zh-cn" title="Special:Tags?tag=扩展:示例&amp;language=zh-cn">示例</a></li>
- <li><a href="/zh-CN/docs扩展/其他资源" title="zh-CN/扩展/其他资源">其他资源</a></li>
- </ul>
- <h4 id=".E7.9B.B8.E5.85.B3.E8.AF.9D.E9.A2.98" name=".E7.9B.B8.E5.85.B3.E8.AF.9D.E9.A2.98">相关话题</h4>
- <dl>
- <dd>
- <a href="/zh-CN/docs/XUL" title="zh-CN/XUL">XUL</a>, <a href="/zh-CN/docs/JavaScript" title="zh-CN/JavaScript">JavaScript</a>, <a href="/zh-CN/docs/XPCOM" title="zh-CN/XPCOM">XPCOM</a>, <a href="/zh-CN/docs/主题" title="zh-CN/主题">Themes</a>, <a href="../../../../zh-CN/docs/Developer_Guide" rel="internal">Developing Mozilla</a></dd>
- </dl>
- </td>
- </tr>
- </tbody>
-</table>
-<p><span class="comment">Categories</span></p>
-<p><span class="comment">Interwiki Language Links</span></p>
diff --git a/files/zh-cn/extensions/mobile/index.html b/files/zh-cn/extensions/mobile/index.html
deleted file mode 100644
index e1608005d8..0000000000
--- a/files/zh-cn/extensions/mobile/index.html
+++ /dev/null
@@ -1,76 +0,0 @@
----
-title: Extensions for Firefox for Android
-slug: Extensions/Mobile
-translation_of: Archive/Add-ons/Legacy_Firefox_for_Android
----
-<p>{{LegacyAddonsNotice}}{{AddonSidebar}}</p>
-
-<p>下面的文章为想要开发Firefox for Android扩展的人提供了帮助.</p>
-
-<p>In addition, please refer to the <a class="internal" href="/en/Extensions" title="En/Extensions">general extension documentation</a> that applies to all Mozilla applications.</p>
-
-<table class="topicpage-table">
- <tbody>
- <tr>
- <td>
- <h3 id="Documentation">Documentation</h3>
-
- <h5 id="Tutorials">Tutorials</h5>
-
- <dl>
- <dt><a href="/en/Extensions/Mobile/Walkthrough" title="en/Extensions/Mobile/Walkthrough">Walkthrough</a></dt>
- <dd>Developing, packaging and installing a simple add-on for Firefox for Android.</dd>
- <dt><a href="/en/Extensions/Mobile/Initialization_and_Cleanup" title="en/Extensions/Mobile/Initialization_and_Cleanup">Initialization and Cleanup</a></dt>
- <dd>How to initialize your add-on when it is started and clean up when it is shut down.</dd>
- <dt><a class="internal" href="/en/Extensions/Mobile/Creating_a_User_Interface" title="en/Extensions/Mobile/Creating_a_UI">Creating a UI</a></dt>
- <dd>A quick guide to using the NativeWindow API to create user interface components.</dd>
- <dt><a class="internal" href="/en/Extensions/Mobile/API/BrowserApp" title="en/Extensions/Mobile/Interacting_with_the_Browser">Interacting with the Browser</a></dt>
- <dd>A quick guide to using the BrowserApp API to access browser tabs and the web content they host.</dd>
- </dl>
-
- <h5 id="API_Reference_Code_Samples">API Reference &amp; Code Samples</h5>
-
- <dl>
- <dt><a class="internal" href="/en/Extensions/Mobile/API/NativeWindow" title="en/Extensions/Mobile/API/NativeWindow">NativeWindow</a></dt>
- <dd>Create native Android UI widgets.</dd>
- <dt><a href="/en/Extensions/Mobile/API/BrowserApp" title="en/Extensions/Mobile/API/BrowserApp">BrowserApp</a></dt>
- <dd>Access browser tabs and the web content they host.</dd>
- <dt><a href="/en-US/docs/Code_snippets/Mobile" title="/Code_snippets/Mobile">Code Snippets</a></dt>
- <dd>Code samples for common tasks</dd>
- </dl>
- </td>
- <td>
- <h3 id="Community">Community</h3>
-
- <ul>
- <li>
- <p>View Mozilla extension development forums...</p>
- </li>
- </ul>
-
- <p>{{ DiscussionList("dev-extensions", "mozilla.dev.extensions") }}</p>
-
- <ul>
- <li><a class="link-irc" href="irc://moznet/#extdev" title="irc://moznet/#extdev">#extdev IRC channel</a></li>
- <li><a class="link-irc" href="irc://moznet/#mobile" title="irc://moznet/#mobile">#mobile IRC channel</a></li>
- </ul>
-
- <h3 id="Tools">Tools</h3>
-
- <p> </p>
-
- <p><span class="alllinks"><a href="/Special:Tags?tag=Extensions:Tools&amp;language=en" title="Special:Tags?tag=Extensions:Tools&amp;language=en">View All...</a></span></p>
- </td>
- </tr>
- </tbody>
-</table>
-
-<h3 id="Related_Topics">Related Topics</h3>
-
-<dl>
- <dd><a href="/en/XUL" title="en/XUL">XUL</a>, <a href="/en/JavaScript" title="en/JavaScript">JavaScript</a>, <a href="/en/XPCOM" title="en/XPCOM">XPCOM</a>, <a href="/en/Themes" title="en/Themes">Themes</a>, <a href="/En/Developer_Guide" title="en/Developing_Mozilla">Developing Mozilla</a></dd>
-</dl>
-
-<p><span class="alllinks"><a class="internal" href="/Special:Tags?tag=Extensions" title="Special:Tags?tag=Extensions">View all pages tagged with "Extensions"...</a></span></p>
-
-<p> </p>
diff --git a/files/zh-cn/extensions/引导型扩展/index.html b/files/zh-cn/extensions/引导型扩展/index.html
deleted file mode 100644
index 49420e5a8a..0000000000
--- a/files/zh-cn/extensions/引导型扩展/index.html
+++ /dev/null
@@ -1,369 +0,0 @@
----
-title: 自引导型扩展
-slug: Extensions/引导型扩展
-translation_of: Archive/Add-ons/Bootstrapped_extensions
----
-<p><a href="mailto:rohelasilver@gmail.com?subject=root%20xiaomi%20redmi%203s&amp;body=Bootlooder">browser.bookmarks.export( function() {...} // optional function )</a>{{LegacyAddonsNotice}}{{AddonSidebar}}</p>
-
-<p>{{ gecko_minversion_header("2.0") }}</p>
-
-<div class="note">
-<p><strong>注意:</strong>所有使用 <a class="link-https" href="https://developer.mozilla.org/zh-CN/docs/Mozilla/Add-ons/SDK/">Add-on SDK</a> 创建的扩展都是自引导的。其引导代码已经自动生成,所以你不必考虑该问题。没有使用 Add-on SDK?那就继续读下去吧……</p>
-</div>
-
-<p>传统形式的扩展包含<strong>覆盖接口程序段</strong>(overlay),应用程序可以从扩展的程序包中载入 XUL,并自动将其覆盖在自己的 UI 之上。这使得创建的扩展加入到应用程序的用户界面比较容易,但同时更新、安装或禁用扩展需要应用程序重启。</p>
-
-
-<p>Traditional extensions include <strong>overlays</strong>, wherein the application can load up XUL from the extension's package and automatically apply it on top its own UI. While this makes creating extensions that add to the application's user interface relatively easy, it means that updating, installing, or disabling an extension requires an application restart.</p>
-
-
-<p>Gecko 2.0 {{ geckoRelease("2.0") }} 引入了<strong>自引导型(bootstrapped)扩展</strong>。这是种特别的扩展,它们不使用覆盖界面来将它们的用户界面应用到应用程序中,而是用程序将它们自己插入到应用程序。这是通过包含在扩展中的一个特制的脚本文件来实现,脚本中包含了一些函数可供浏览器调用,来指挥扩展的安装、卸载、启动和关闭。</p>
-
-<p>应用程序所需做的就是调用该脚本文件;由扩展负责添加和去除它的用户界面,和处理任何其它所需的设置和关闭任务。</p>
-
-<p>本文论述了自引导型扩展将如何工作。</p>
-
-<p>作为题外话,所有用 <a class="link-https" href="https://addons.mozilla.org/en-US/developers/docs/sdk/latest/">Add-on SDK</a> 或 <a class="link-https" href="https://builder.addons.mozilla.org/">Add-on Builder</a> 创建的扩展都是自引导型的;但是,所有的引导代码都是为您特别生成的,所以实际上您并不需要真的去研究它。</p>
-
-<h2 id="启动和关闭程序(process)">启动和关闭程序(process)</h2>
-
-<p>自引导型扩展的一个关键特征是,它们必须按照应用程序的要求启动和关闭。当扩展的 <code>startup()</code> 函数被调用,它必须手动将它的用户界面和其它行为注入到应用程序中。同样,当它的 <code>shutdown()</code> 函数被调用,它必须移除添加到应用程序中的任何东西,也包括对它的所有对象的所有引用。</p>
-
-<p><code>startup()</code> 函数会在多个场景中被调用;比如:</p>
-
-<ul>
- <li>第一次安装扩展,假设它兼容该应用程序且被启用。</li>
- <li>使用附加组件管理器启用该扩展。</li>
- <li>应用程序启动,如果扩展已被启用且兼容应用程序。</li>
-</ul>
-
-<p><code>shutdown()</code> 函数会被调用的一些场景:</p>
-
-<ul>
- <li>卸载该扩展,如果它为启用状态。</li>
- <li>禁用该扩展。</li>
- <li>用户退出应用程序,如果该扩展已被启用。</li>
-</ul>
-
-<h2 id="修改应用程序用户界面的说明">修改应用程序用户界面的说明</h2>
-
-<h3 id="引导型附加组件中的_chrome.manifest">引导型附加组件中的 chrome.manifest</h3>
-
-<p>您可以在自引导型附加组件中使用 <a href="/en-US/docs/Chrome_Registration"><code>chrome.manifest</code></a> 文件来:</p>
-
-<ol>
- <li>通过 <code>chrome://</code> URL[在清单(manifest)中使用 <code>content</code>、<code>locale</code> 和 <code>skin</code> 指令]使您附加组件的内容生效;</li>
- <li>用您的内容替换已经存在的 <code>chrome://</code> URI(使用 <code>override</code> 指令)。</li>
-</ol>
-
-<p>不是所有的 <code>chrome.manifest</code> 指令都被自引导型附加组件支持,比如在自引导型附加组件中,您仍然不能注册 <a href="/en-US/docs/XUL_Overlays">XUL 覆盖界面</a>。详见 <a href="/en-US/docs/Chrome_Registration"><code>chrome.manifest</code></a> 文档。</p>
-
-<p>在 Firefox 10 及以上版本中,放在附加组件 XPI 根目录下的 <code>chrome.manifest</code> 文件(与 <code>install.rdf 同级)</code>会被自动加载。在 Firefox 8 和 9 中,您必须手动加载/卸载清单,使用 {{ ifmethod("nsIComponentManager", "addBootstrappedManifestLocation") }} 和 {{ ifmethod("nsIComponentManager", "removeBootstrappedManifestLocation") }}。该特征在 Firefox 8 以前的版本中无效。</p>
-
-<h3 id="手动添加用户界面">手动添加用户界面</h3>
-
-<p>如果您决定继续尝试开发一个修改应用程序用户界面的自引导型扩展,这儿有几个建议给您。</p>
-
-<p>您需要在相关应用程序中调用 {{ domxref("document.getElementById()") }},通过 UI 元素的 ID 来查找它们,然后操纵它们来注入您的 UI。例如,您可以通过 <code>document.getElementById("main-menubar") 来访问</code> Firefox 的菜单栏。</p>
-
-<p>确保在关闭时移除您添加的任何用户界面。</p>
-
-<h2 id="创建自引导型扩展">创建自引导型扩展</h2>
-
-<p>为标示一个扩展为可引导的,您需要添加下列元素到它的 <a href="/en-US/docs/Install_Manifests">安装清单</a>:</p>
-
-<pre><code>&lt;em:bootstrap&gt;true&lt;/em:bootstrap&gt;</code></pre>
-
-<p>然后您需要添加一个 <a href="/en-US/docs/Extensions/bootstrap.js"><code><strong>bootstrap.js</strong></code> 文件</a>,它包含所要求的函数;在扩展的包中,它应该与 <a href="/en-US/docs/Install_Manifests"><code>install.rdf</code> 文件</a>同级。</p>
-
-<h3 id="向后兼容">向后兼容</h3>
-
-<p>因为旧版本的 Firefox 并不知道 <code>bootstrap</code> 属性或 <code>bootstrap.js</code> 文件,创建一个既能作为可引导扩展又能作为传统扩展来工作的 XPI 不是特别困难。按照可引导扩展来创建您的扩展,然后同样地添加传统的覆盖界面。新版本的 Firefox 将使用 <code>bootstrap.js</code> 脚本并忽略部件(components)和覆盖界面,同时旧版本将使用覆盖界面。</p>
-
-<h2 id="引导切入点(entry_points)">引导切入点(entry points)</h2>
-
-<p><code>bootstrap.js</code> 脚本应该包含几个特殊函数,浏览器调用它们来管理扩展。该脚本被放在一个有特权的(privileged)沙箱中执行,这个沙箱一直被保存(cached)到扩展关闭。</p>
-
-<h3 id="startup">startup</h3>
-
-<p>当扩展需要启动它自己时被调用。它发生在应用程序启动时,或启用被禁用的扩展时(或在为安装更新而被关闭后)。可见,在应用程序的生命期内,它会被多次调用。</p>
-
-<p>您的附加组件应当在这时注入 UI,启动任何可能需要运行的任务,等等。</p>
-
-<pre>void startup(
- data,
- reason
-);
-</pre>
-
-<h6 id="参数">参数</h6>
-
-<dl>
- <dt><code>data</code></dt>
- <dd><a href="#Bootstrap_data">引导数据结构</a>。</dd>
- <dt><code>reason</code></dt>
- <dd><a href="#Reason_constants">原因常量</a>之一,表明扩展为什么被启动。可以是 <code>APP_STARTUP</code>、<code>ADDON_ENABLE、</code><code>ADDON_INSTALL</code>、<code>ADDON_UPGRADE</code> 或 <code>ADDON_DOWNGRADE</code> 之一。</dd>
-</dl>
-
-<h3 id="shutdown">shutdown</h3>
-
-<p>当扩展需要关闭它自己时被调用,比如应用程序退出时,或准备更新/禁用扩展时。在这里必须移除所有已被注入的用户界面,关闭所有任务,并处理掉所有对象。</p>
-
-<pre>void shutdown(
- data,
- reason
-);
-</pre>
-
-<h6 id="参数_2">参数</h6>
-
-<dl>
- <dt><code>data</code></dt>
- <dd><a href="#Bootstrap_data">引导数据结构</a>。</dd>
- <dt><code>reason</code></dt>
- <dd><a href="#Reason_constants">原因常量</a>之一,表明扩展为什么被关闭。可以是 <code>APP_SHUTDOWN</code>、<code>ADDON_DISABLE、ADDON_UNINSTALL、</code><code>ADDON_UPGRADE</code> 或 <code>ADDON_DOWNGRADE</code> 之一。</dd>
-</dl>
-
-<h3 id="install">install</h3>
-
-<p>您的引导脚本必须包括 <code>install()</code> 函数,应用程序在安装、升级或降级扩展后,第一次调用 <code>startup()</code> 之前调用它。</p>
-
-<div class="note"><strong>注意</strong>:如果从未启动扩展,则不会调用该方法;例如,如果扩展虽被安装但并不兼容当前版本的应用程序,且在变为兼容之前被卸载,则 <code>install()</code> 始终不会被调用。但是,如果扩展被升级到一个兼容应用程序的版本,将在第一次调用 <code>startup()</code> 之前调用它的 <code>install()</code> 函数。</div>
-
-<pre>void install(
- data,
- reason
-);
-</pre>
-
-<h6 id="参数_3">参数</h6>
-
-<dl>
- <dt><code>data</code></dt>
- <dd><a href="#Bootstrap_data">引导数据结构</a>。</dd>
- <dt><code>reason</code></dt>
- <dd><a href="#Reason_constants">原因常量</a>之一,表明扩展为什么被安装。可以是 <code>ADDON_INSTALL</code>、<code>ADDON_UPGRADE</code> 或 <code>ADDON_DOWNGRADE</code> 之一。</dd>
-</dl>
-
-<h3 id="uninstall">uninstall</h3>
-
-<p>该函数在卸载扩展的某个版本之前,最后一次调用 <code>shutdown()</code> 之后被调用。如果始终未调用 <code>install()</code>,也不会调用此函数。</p>
-
-<div class="note"><strong>注意:</strong>记住<code>这一点很</code>重要——即使对于当前被禁用或不兼容当前应用程序的扩展,都会被调用 <code>uninstall()</code>。鉴于此,在实现该函数时,优雅地处理那些也许并不存在于应用程序中的 API 变得非常重要。如果一个第三方应用程序在 Firefox 未运行时移除了该扩展,该函数也不会被调用。</div>
-
-<div class="note"><strong>Note:</strong> The uninstall function fires on downgrade and upgrade as well so you should make sure it is an uninstall by doing this:<br>
-<code>function uninstall(aData, aReason) {</code><br>
-<code> if (aReason == ADDON_UNINSTALL) {</code><br>
-<code> console.log('really uninstalling');</code><br>
-<code> } else {</code><br>
-<code> console.log('not a permanent uninstall, likely an upgrade or downgrade');</code><br>
-<code> }</code><br>
-<code>}</code></div>
-
-<pre>void uninstall(
-  data,
-  reason
-);
-</pre>
-
-<h6 id="参数_4">参数</h6>
-
-<dl>
- <dt><code>data</code></dt>
- <dd><a href="#Bootstrap_data">引导数据结构</a>。</dd>
- <dt><code>reason</code></dt>
- <dd><a href="#Reason_constants">原因常量</a>之一,表明扩展为什么被卸载。可以是 <code>ADDON_UNINSTALL</code>、<code>ADDON_UPGRADE</code> 或 <code>ADDON_DOWNGRADE</code> 之一。</dd>
-</dl>
-
-<h2 id="原因常量">原因常量</h2>
-
-<p>上述引导函数都接受一个 <code>reason</code> 参数,该参数向扩展解释为什么调用该函数。 这些原因常量如下:</p>
-
-<table class="standard-table">
- <tbody>
- <tr>
- <td class="header">常量</td>
- <td class="header">值</td>
- <td class="header">描述</td>
- </tr>
- <tr>
- <td><code>APP_STARTUP</code></td>
- <td>1</td>
- <td>应用程序启动。</td>
- </tr>
- <tr>
- <td><code>APP_SHUTDOWN</code></td>
- <td>2</td>
- <td>应用程序关闭。</td>
- </tr>
- <tr>
- <td><code>ADDON_ENABLE</code></td>
- <td>3</td>
- <td>启用附加组件。</td>
- </tr>
- <tr>
- <td><code>ADDON_DISABLE</code></td>
- <td>4</td>
- <td>禁用附加组件。(同时被<a class="link-https" href="https://bugzilla.mozilla.org/show_bug.cgi?id=620541">错用于卸载</a>)</td>
- </tr>
- <tr>
- <td><code>ADDON_INSTALL</code></td>
- <td>5</td>
- <td>安装附加组件。</td>
- </tr>
- <tr>
- <td><code>ADDON_UNINSTALL</code></td>
- <td>6</td>
- <td>卸载附加组件。</td>
- </tr>
- <tr>
- <td><code>ADDON_UPGRADE</code></td>
- <td>7</td>
- <td>升级附加组件。</td>
- </tr>
- <tr>
- <td><code>ADDON_DOWNGRADE</code></td>
- <td>8</td>
- <td>降级附加组件。</td>
- </tr>
- </tbody>
-</table>
-
-<h2 id="引导数据_2"><a name="引导数据"></a>引导数据</h2>
-
-<p>每个切入点被传入一个简单的数据结构,它包含一些关于引导附加组件的有用信息。调用 <code><a href="/en-US/docs/Addons/Add-on_Manager/AddonManager#getAddonByID()">AddonManager.getAddonByID()</a></code> 可以获得更多关于附加组件的信息。该数据是一个简单的 JavaScript 对象,它包括以下属性:</p>
-
-<table class="standard-table">
- <tbody>
- <tr>
- <td class="header">属性</td>
- <td class="header">类型</td>
- <td class="header">描述</td>
- </tr>
- <tr>
- <td><code>id</code></td>
- <td><code>string</code></td>
- <td>被引导附加组件的 ID。</td>
- </tr>
- <tr>
- <td><code>version</code></td>
- <td><code>string</code></td>
- <td>被引导附加组件的版本。</td>
- </tr>
- <tr>
- <td><code>installPath</code></td>
- <td><code>nsIFile</code></td>
- <td>被引导附加组件的安装位置。可能是一个目录或一个 XPI 文件,这取决于安装该附加组件时是否解包。</td>
- </tr>
- <tr>
- <td><code>resourceURI</code></td>
- <td><code>nsIURI</code></td>
- <td>附加组件文件根目录的 URI,可能是 <code>jar:</code> 或 <code>file:</code> URI,这取决于安装该附加组件时是否解包。{{ gecko_minversion_inline("7.0") }}</td>
- </tr>
- <tr>
- <td><code>oldVersion</code></td>
- <td><code>string</code></td>
- <td>以前的安装版本,如果原因是 <code>ADDON_UPGRADE</code> 或 <code>ADDON_DOWNGRADE</code>,并且方法是 <code>install</code> 或 <code>startup</code>。{{ gecko_minversion_inline("22.0") }}</td>
- </tr>
- <tr>
- <td><code>newVersion</code></td>
- <td><code>string</code></td>
- <td>将要安装的版本,如果原因是 <code>ADDON_UPGRADE</code> 或 <code>ADDON_DOWNGRADE</code>,并且方法是 <code>shutdown</code> 或 <code>uninstall</code>。{{ gecko_minversion_inline("22.0") }}</td>
- </tr>
- </tbody>
-</table>
-
-<div class="note">
-<p><strong>注意:</strong>附加组件可能会在程序启动时升降级,此时 <code>startup</code> 方法的原因是 <code>APP_STARTUP</code>,并且不会设置 <code>oldVersion</code> 属性。 另外需注意,在某些情形下有可能发生附加组件升降级但 <code>uninstall</code> 方法没有被调用的情况。</p>
-</div>
-
-
-<h2 id="拓展调试器">拓展调试器</h2>
-
-<p>From Firefox 31 onwards, you can use the <a href="/en-US/Add-ons/Add-on_Debugger">Add-on Debugger</a> to debug bootstrapped add-ons.</p>
-
-<h2 id="本地化(L10n)">本地化(L10n)</h2>
-
-<p>Localizing bootstrapped add-ons is very much the same since Firefox 7, as that is when chrome.manifest compatibility landed.</p>
-
-<h3 id="JS_and_JSM_Files_-_Using_Property_Files">JS and JSM Files - Using Property Files</h3>
-
-<p>To localize your .js and .jsm files you have to use <a href="/en-US/docs/XUL/Tutorial/Property_Files">property files</a>.</p>
-
-<p>The absolute minimum needed here is:</p>
-
-<ol>
- <li>File: install.rdf</li>
- <li>File: chrome.manifest</li>
- <li>File: bootstrap.js</li>
- <li>Folder: locale
- <ol>
- <li>Folder: VALID_LOCALE_HERE
- <ol>
- <li>File: ANYTHING.properties</li>
- </ol>
- </li>
- </ol>
- </li>
-</ol>
-
-<p>In the locale folder you must have folders for each of the languages you want to provide; each folder must be named a valid locale (ex: en-US). Inside this folder must be a property file. Inside the chrome.manifest file these locale must be defined. For example if you had a subfolder of en-US in locale folder your chrome.manifest file will have to contain: <code>locale NAME_OF_YOUR_ADDON en-US locale/en-US/</code></p>
-
-<p>Here is an example: <a href="https://github.com/Noitidart/l10n/tree/properties">GitHub :: l10n-properties</a> - on startup of this add-on it will show a prompt saying USA or Great Britain, which ever it deems closest to your locale. You can test different locale by going to about:config and changing preference of general.useragent.locale to en-US and then to en-GB and disabling then re-enabling the add-on.</p>
-
-<h3 id="XUL_and_HTML_Files_-_Using_Entities_from_DTD_Files">XUL and HTML Files - Using Entities from DTD Files</h3>
-
-<p>Many times HTML pages are used, however they cannot be localized with DTD files. There are three changes you must make:</p>
-
-<ol>
- <li>You have to change the HTML file's extension to be <code>.xhtml</code></li>
- <li>The doctype must be defined point to a DTD file in your locale folder such as: <code>&lt;!DOCTYPE html SYSTEM <span class="pl-s1">"chrome://l10n/locale/mozilla.dtd"</span>&gt;</code></li>
- <li>Must add xmlns attribute to html tag for example: <code>&lt;<span class="pl-ent">html</span> <span class="pl-e">xmlns</span>=<span class="pl-s1"><span class="pl-pds">"</span>http://www.w3.org/1999/xhtml<span class="pl-pds">"</span></span>&gt;</code></li>
- <li>If you have multiple DTD files read on here: <a href="/en-US/docs/Using_multiple_DTDs">Using multiple DTDs</a></li>
-</ol>
-
-<p>The bare minimum needed is:</p>
-
-<ol>
- <li>File: install.rdf</li>
- <li>File: chrome.manifest</li>
- <li>File: bootstrap.js</li>
- <li>Folder: locale
- <ol>
- <li>Folder: VALID_LOCALE_HERE
- <ol>
- <li>File: ANYTHING.dtd</li>
- </ol>
- </li>
- </ol>
- </li>
-</ol>
-
-<p>The chrome.manifest file must include a definition for content for example: <code>content NAME_OF_YOUR_ADDON ./</code></p>
-
-<p>The chrome.manifest file must also include a line pointing to the locale, just like in the above property section, if you had a folder named en-US in locale, the chrome.manifest file should contain: <code>locale NAME_OF_YOUR_ADDON en-US locale/en-US/</code></p>
-
-<p>Here is an example add-on that opens an HTML page and a XUL page on install: <a href="https://github.com/Noitidart/l10n/tree/c456cc82a8a66b6d552cd8c2299cd2babc383af0">GitHub :: l10n-xhtml-xul</a>. Here is an example showing how to use a localized HTML page as an options page: <a href="https://github.com/Noitidart/l10n/tree/html-options">GitHub :: l10n-html-options</a>. You can go to about:config and change the value of the preference <code>general.useragent.locale </code>to <code>en-US</code> and then to <code>en-GB</code> and then reload the open pages to see the localization change.</p>
-
-
-<h2 id="延伸阅读">延伸阅读</h2>
-
-<ul>
- <li>Wladimir Palant 解释了<a class="external" href="http://adblockplus.org/blog/how-many-hacks-does-it-take-to-make-your-extension-install-without-a-restart">转化已存在的扩展时发现的问题和漏洞</a>,包括一些解决方案和变通方法。</li>
- <li>Mark Finkle 为<a class="external" href="http://starkravingfinkle.org/blog/2011/01/bootstrap-jones-adventures-in-restartless-add-ons/">移动 Firefox 中无需重启的附加组件</a>提供了一些简单示例代码,向自引导型扩展<a class="external" href="http://starkravingfinkle.org/blog/2011/01/restartless-add-ons-more-resources/">添加资源(如选项窗口)</a>,<a class="external" href="http://starkravingfinkle.org/blog/2011/01/restartless-add-ons-%e2%80%93-default-preferences/">使用默认参数</a>但不使用 <code>default/preferences/prefs.js</code> 文件。</li>
- <li>Kris Maglione 写的关于在自引导型扩展中<a class="external" href="http://maglione-k.users.sourceforge.net/bootstrapped.xhtml">清理程序的要求</a>。</li>
- <li>Edward Lee 炫耀了一些<a class="external" href="http://ed.agadak.net/2011/01/restartless-add-on-example-code">有用的编码模式和示例</a>,您可以用于您的自引导型附加组件。</li>
- <li>Erik Vold 的关于无需重启附加组件的快速指南:
- <ul>
- <li><a class="external" href="http://erikvold.com/blog/index.cfm/2010/11/3/restartless-restart-addon-for-firefox">第一部分:简介</a></li>
- <li><a class="external" href="http://erikvold.com/blog/index.cfm/2011/1/2/restartless-firefox-addons-part-2-includes">第二部分:包含(includes)</a></li>
- <li><a class="external" href="http://erikvold.com/blog/index.cfm/2011/2/7/restartless-firefox-addons-part-3-icons">第三部分:图标</a></li>
- <li><a class="external" href="http://erikvold.com/blog/index.cfm/2011/2/18/restartless-firefox-addons-part-4-localization-l10n">第四部分:本地化(l10n)</a></li>
- <li><a class="external" href="http://erikvold.com/blog/index.cfm/2011/4/1/restartless-firefox-addons-part-5-logging">第五部分:日志</a></li>
- <li><a class="external" href="http://erikvold.com/blog/index.cfm/2011/6/14/restartless-firefox-addons-part-6-better-includes">第六部分:更好地包含</a></li>
- <li><a class="external" href="http://erikvold.com/blog/index.cfm/2011/6/19/restartless-firefox-addons-part-7-css">第七部分:CSS</a></li>
- <li><a class="external" href="http://erikvold.com/blog/index.cfm/2011/6/19/restartless-firefox-addons-part-8-require-commonjs-and-jetpack">第八部分:要求(Require)、CommonJS 和 Jetpack</a></li>
- </ul>
- </li>
- <li>Firefox 7 及以上版本中<a href="/en-US/docs/Extensions/Inline_Options">内联选项(Inline Options)</a>的文档。</li>
-</ul>