aboutsummaryrefslogtreecommitdiff
path: root/files/zh-tw/mozilla/add-ons
diff options
context:
space:
mode:
Diffstat (limited to 'files/zh-tw/mozilla/add-ons')
-rw-r--r--files/zh-tw/mozilla/add-ons/add-on_debugger/index.html78
-rw-r--r--files/zh-tw/mozilla/add-ons/add-on_guidelines/index.html117
-rw-r--r--files/zh-tw/mozilla/add-ons/amo/index.html9
-rw-r--r--files/zh-tw/mozilla/add-ons/amo/policy/index.html21
-rw-r--r--files/zh-tw/mozilla/add-ons/amo/policy/聯絡資訊/index.html24
-rw-r--r--files/zh-tw/mozilla/add-ons/firefox_for_android/api/index.html30
-rw-r--r--files/zh-tw/mozilla/add-ons/firefox_for_android/index.html70
-rw-r--r--files/zh-tw/mozilla/add-ons/sdk/builder/index.html13
-rw-r--r--files/zh-tw/mozilla/add-ons/sdk/guides/index.html115
-rw-r--r--files/zh-tw/mozilla/add-ons/sdk/high-level_apis/context-menu/index.html588
-rw-r--r--files/zh-tw/mozilla/add-ons/sdk/high-level_apis/index.html10
-rw-r--r--files/zh-tw/mozilla/add-ons/sdk/index.html82
-rw-r--r--files/zh-tw/mozilla/add-ons/sdk/low-level_apis/index.html20
-rw-r--r--files/zh-tw/mozilla/add-ons/themes/obsolete/index.html10
14 files changed, 0 insertions, 1187 deletions
diff --git a/files/zh-tw/mozilla/add-ons/add-on_debugger/index.html b/files/zh-tw/mozilla/add-ons/add-on_debugger/index.html
deleted file mode 100644
index 2b3106d6af..0000000000
--- a/files/zh-tw/mozilla/add-ons/add-on_debugger/index.html
+++ /dev/null
@@ -1,78 +0,0 @@
----
-title: 附加元件除錯工具箱
-slug: Mozilla/Add-ons/Add-on_Debugger
-translation_of: 'https://extensionworkshop.com/documentation/develop/debugging/'
----
-<p>{{AddonSidebar}}</p>
-
-<p>附加元件除錯工具箱提供 Firefox 工具箱中的部分工具,能在附加元件的作用範圍中除錯:</p>
-
-<ul>
- <li><a href="/en-US/docs/Tools/Debugger">JavaScript 除錯器</a>,可用以設定中斷點,或測試程式執行內部的各種狀態。</li>
- <li><a href="/en-US/docs/Tools/Web_Console">主控台</a>,可用以查閱 log 訊息,或者在附加元件的作用範圍中執行 JavaScript</li>
- <li><a href="/en-US/docs/Tools/Scratchpad">程式碼速記本</a>,可以在附加元件的作用範圍中執行 JavaScript,並另存為新檔</li>
-</ul>
-
-<p>需要重新啟動瀏覽器的 XUL overlay 附加元件無法使用附加元件除錯工具箱,這類的元件請使用<a href="/en-US/docs/Tools/Browser_Toolbox">瀏覽器工具箱</a>。</p>
-
-<p>請看這段影片,快速認識附加元件除錯工具箱:</p>
-
-<p>{{EmbedYouTube("KU3Xsck7qy0")}}</p>
-
-<h2 id="啟用附加元件除錯工具箱" style="line-height: 30px; font-size: 2.14285714285714rem;">啟用附加元件除錯工具箱</h2>
-
-<div>
-<p>如欲啟用附加元件除錯工具箱,您必須啟用 Firefox 裡的「啟用瀏覽器 chrome 與附加元件除錯工具箱」及「啟用遠端除錯」兩項設定。您可開啟<a href="https://developer.mozilla.org/en-US/docs/Tools/Tools_Toolbox">網頁工具箱</a>裡的<a href="https://developer.mozilla.org/en-US/docs/Tools/Tools_Toolbox#Settings">設定</a>,而後在「<a href="https://developer.mozilla.org/en-US/docs/Tools/Tools_Toolbox#Advanced_settings">進階設定</a>」一區中啟用上述選項。</p>
-</div>
-
-<h2 id="開啟附加元件除錯工具箱"><span style="font-size: 2.14285714285714rem;">開啟</span>附加元件除錯工具箱</h2>
-
-<p><em>註:如前所述,附加元件除錯工具</em>箱<em>是專供不需重新啟動、以 SDK 製作的附加元件使用。若想為其他類型的附加元件除錯,請使用<span style="line-height: 1.5;"><a href="https://developer.mozilla.org/en-US/docs/Tools/Browser_Toolbox">瀏覽器工具箱</a>裡的工具。</span></em></p>
-
-<p><span style="line-height: 1.5;">Now open the Add-on Manager. Next to the entry for your add-on you will see a button labeled "Debug". Click this button to launch the debugger.</span></p>
-
-<p>Next you'll see a dialog asking you to accept an incoming connection. Click "OK", and the debugger will start in a separate window. Note that sometimes the debugger window is hidden by the main Firefox window.</p>
-
-<p>{{EmbedYouTube("DvNpUVJcG_E")}}</p>
-
-<h2 id="使用附加元件除錯工具">使用附加元件除錯工具</h2>
-
-<p>The Add-on Debugger looks and behaves very much like the <a href="/en-US/docs/Tools/Browser_Toolbox">Browser Toolbox</a>, except that while the scope of the Browser Toolbox is the whole browser, the Add-on Debugger is focused on the specific add-on for which you launched it. Like the Browser Toolbox, a toolbar along the top lets you switch between a number of different tools. In Firefox 31 there's only one such tool, the JavaScript Debugger, but with Firefox 32 you also get the Console and Scratchpad.</p>
-
-<h3 id="JavaScript_除錯器">JavaScript 除錯器</h3>
-
-<p>This behaves just like the normal <a href="/en-US/docs/Tools/Debugger">JavaScript Debugger</a>, except its scope is the add-on rather than a web page. On the left-hand side it lists JavaScript sources:</p>
-
-<ul>
- <li>at the top is <code>bootstrap.js</code>: either the one you've written if your add-on is a manually written <a href="/en-US/Add-ons/Bootstrapped_extensions">bootstrapped add-on</a>, or the one included by the SDK if your add-on is an SDK add-on.</li>
- <li>next, if your add-on is an SDK add-on, you'll find your add-on's <code>main.js</code>, any <a href="/en-US/Add-ons/SDK/Guides/Module_structure_of_the_SDK#Local_Modules">local modules</a> shipping with your add-on, and any content scripts that are currently loaded</li>
- <li>next, all the SDK modules used directly or indirectly by your add-on</li>
-</ul>
-
-<h4 id="Content_scripts">Content scripts</h4>
-
-<p>Content scripts are only listed if and when they are loaded. So, if your Add-on <a href="/en-US/Add-ons/SDK/Guides/Content_Scripts#Loading_content_scripts">loads a content script</a> with <code>contentScriptFile</code>, the file will not appear in the debugger sources until you go to a page that loads the content script.</p>
-
-<p>If you set a breakpoint in a content script, it will not be active for instances of the content script which are loaded after the breakpoint is set.</p>
-
-<p>For example, suppose you have an add-on that attaches a content script to every tab the user loads. The content script adds a click handler to the page. As soon as you open a tab, this content script will be listed in the debugger. If you then set a breakpoint in the content script's click handler, then execution will pause whenever you click the page. But if you open a new tab, there are now two instances of the content script, and the breakpoint will not be enabled for the second instance You'll need to set a new breakpoint now if you want to it work for the second instance.</p>
-
-<p>We're investigating improvements to this in <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1016046">bug 1016046</a>.</p>
-
-<h3 id="主控台">主控台</h3>
-
-<p>The Console behaves just like the <a href="/en-US/docs/Tools/Web_Console">Web Console</a>, but its scope is the add-on rather than the web page.</p>
-
-<p>However, note that it actually runs in the context of the add-on's <code>bootstrap.js</code>, which may not be what you expect if your add-on uses the SDK: you won't see any objects defined in your add-on's <code>main.js</code>, and you won't see <code>require()</code> either. This issue is being tracked as <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1005193">bug 1005193</a>.</p>
-
-<p>You can execute Console statements in the context of <code>main.js</code> while execution is paused inside <code>main.js</code>.</p>
-
-<h3 id="程式碼速記本">程式碼速記本</h3>
-
-<p>The Scratchpad behaves just like the normal <a href="/en-US/docs/Tools/Scratchpad">Scratchpad</a>, but its scope is the add-on rather than the web page.</p>
-
-<p>Like the Console, the add-on Scratchpad runs in the context of the add-on's <code>bootstrap.js</code> even if the add-on uses the SDK, and as with the Console you can execute Scratchpad code in the context of <code>main.js</code> while execution is paused inside <code>main.js</code>.</p>
-
-<h2 id="為_chrome_或_about_頁面除錯">為 chrome: 或 about: 頁面除錯</h2>
-
-<p>從 Firefox 37 起,一般的<a href="/en-US/docs/Tools/Debugger">除錯工具</a>已經可以用來為 chrome: 及 about: 兩類頁面除錯,使用方法同一般網頁除錯。</p>
diff --git a/files/zh-tw/mozilla/add-ons/add-on_guidelines/index.html b/files/zh-tw/mozilla/add-ons/add-on_guidelines/index.html
deleted file mode 100644
index fe05866a87..0000000000
--- a/files/zh-tw/mozilla/add-ons/add-on_guidelines/index.html
+++ /dev/null
@@ -1,117 +0,0 @@
----
-title: Add-on guidelines
-slug: Mozilla/Add-ons/Add-on_guidelines
-translation_of: 'https://extensionworkshop.com/documentation/publish/add-on-policies/'
----
-<p>These add-on guidelines were created to foster an open and diverse add-on developer community while ensuring an excellent user experience. They apply to all add-ons and add-on updates regardless of where they are hosted, and also apply to customizations performed by installers that configure Firefox without using an add-on. Add-ons hosted on <a class="external text" href="https://addons.mozilla.org/" rel="nofollow">AMO</a> are subject to <a href="https://addons.mozilla.org/developers/docs/policies" title="https://addons.mozilla.org/developers/docs/policies">additional policies</a>.</p>
-<h2 id="Be_Transparent">Be Transparent</h2>
-<ul>
- <li>Add-ons must either be installed using the add-on web install system, or be approved by the user using the <a class="external text" href="https://blog.mozilla.org/addons/2011/08/11/strengthening-user-control-of-add-ons/" rel="nofollow">install opt-in dialog</a>.
- <ul>
- <li>We want our users to know what they are installing so that they are not unpleasantly surprised by changes they did not expect. We also want them to know what to remove if they decide not to keep it.</li>
- <li>Add-ons installed through application installers should <a class="external text" href="/en-US/docs/Adding_Extensions_using_the_Windows_Registry" rel="nofollow">use the Windows Registry</a> or equivalent global install methods so that Firefox displays the opt-in screen. The opt-in screen must not be tampered with in any way, including overlaying additional information or images on top of it.</li>
- </ul>
- </li>
- <li>Add-ons must always be possible to uninstall or disable from the Add-ons Manager.
- <ul>
- <li>Add-ons installed globally using the Windows registry or global extension directories cannot be uninstalled (<a class="external text" href="https://bugzilla.mozilla.org/show_bug.cgi?id=640775" rel="nofollow">bug 640775</a>), but they can be disabled to the same effect.</li>
- </ul>
- </li>
- <li>Add-ons must use a <a class="external text" href="/en-US/docs/Install_manifests#id" rel="nofollow">single unique ID</a> during their entire lifetime.
- <ul>
- <li>Using the same ID for multiple products, or multiple IDs for a single product, can lead to problems with automatic updates as well as blocklisting conflicts. Add-ons may change their IDs due to ownership changes, as they commonly use an email address-like format (
- <i>
- e.g.,</i>
- personasplus@mozilla.com).</li>
- </ul>
- </li>
- <li>Add-ons must not use brand names, trademarks, or other terms in ways that deceive users. Using Mozilla trademarks must follow <a class="external text" href="http://www.mozilla.org/foundation/trademarks/policy.html" rel="nofollow">our trademark policy</a>.</li>
- <li>Add-ons should clearly communicate their intended purpose and active features, including features introduced through updates.
- <ul>
- <li>While we understand and support add-on developers who choose to monetize their products, this should not come at the expense of users' browsing experience. If an add-on inserts advertisements, affiliate codes, sponsored search results, or the like, into web pages, the user should be made aware of this when the add-on is installed. Likewise, if some features require payment to use, or require payment to remain active after a trial period, users should be made aware of this.</li>
- </ul>
- </li>
-</ul>
-<h2 id="Be_Respectful_to_Users">Be Respectful to Users</h2>
-<ul>
- <li>Add-ons must remove all introduced code, executables, and application configuration changes when they are uninstalled.
- <ul>
- <li>Uninstalling an add-on using the regular uninstall process should generally suffice. This guideline primarily applies to changes made to preferences such as the homepage, default search URL, network settings, and so forth. These preferences should be restored to their previous values when the add-on is uninstalled. Most add-ons can easily accomplish this by making such changes via a <a class="external text" href="/en-US/docs/Building_an_Extension#Defaults_Files" rel="nofollow">default preferences file</a>.</li>
- </ul>
- </li>
- <li>Add-ons must respect the users' choices and not make unexpected changes, or limit users' ability to revert them.
- <ul>
- <li>For instance, users generally do not expect an add-on to change the Firefox homepage. Asking users to opt-in to such extra changes is recommended.</li>
- <li>Making settings changes difficult or impossible to revert is prohibited. It's not allowed to block users or other add-ons or installers from changing any settings.</li>
- </ul>
- </li>
- <li>Add-ons should make it clear how private user data is being used.
- <ul>
- <li>Add-ons which send user data over the Internet should generally provide a Privacy Policy, ideally concise and easily readable.</li>
- </ul>
- </li>
- <li>Add-on developers should provide a mechanism for them to be contacted.
- <ul>
- <li>While developers are not required to provide a support channel for users, it is recommended. All add-on developers should have a contact form or public email address so that they can be contacted in case of emergencies, such as guideline violations that could lead to blocklisting.</li>
- </ul>
- </li>
-</ul>
-<h2 id="Be_Safe">Be Safe</h2>
-<ul>
- <li>Add-ons must not cause harm to users' data, system, or online identities.</li>
- <li>Add-ons must not transmit users' private data unsafely, or expose it to third parties unnecessarily.
- <ul>
- <li>Private data should always be sent over a secure connection. This includes browsing data such as visited URLs and bookmarks.</li>
- <li>Making the browser easier to fingerprint by adding text to the User-Agent string or adding custom headers is also a privacy concern, and should be avoided.</li>
- </ul>
- </li>
- <li>Add-ons must not create or expose application or system vulnerabilities.
- <ul>
- <li>Security bugs happen, but once discovered they need to be addressed immediately. A popular add-on with a security vulnerability is a valuable attack vector for hackers, and in such cases we will move quickly to blocklist the add-on if there is no prompt response from the developer.</li>
- </ul>
- </li>
- <li>Add-ons must not tamper with the application or blocklist update systems.</li>
- <li>Add-ons should not store any browsing data while in Private Browsing Mode.
- <ul>
- <li>It's worth stressing that PBM is about avoiding storing
- <i>
- local</i>
- data while browsing, not about sending data elsewhere. To learn more about PBM we recommend reading <a class="external text" href="http://ehsanakhgari.org/tag/privatebrowsing" rel="nofollow">Ehsan's blog posts</a> about it.</li>
- </ul>
- </li>
-</ul>
-<h2 id="Be_Stable">Be Stable</h2>
-<ul>
- <li>Add-ons must not cause hangs or crashes.</li>
- <li>Add-ons should not break or disable core application features.
- <ul>
- <li>This includes features like tabbed browsing, Private Browsing Mode, and the location bar. Add-ons that are specifically meant to do this are exempt.</li>
- </ul>
- </li>
- <li>Add-ons should not cause memory leaks, or unnecessarily consume large amounts of memory.</li>
- <li>Add-ons should not slow down the application or system significantly.</li>
- <li>Add-ons should not consume network resources to an extent that affects regular application usage.
- <ul>
- <li>Downloading large amounts of data without user awareness can significantly disrupt regular browsing, and may result in unexpected charges for users who have network usage limitations (notably on mobile).</li>
- </ul>
- </li>
-</ul>
-<h2 id="Exceptions">Exceptions</h2>
-<ul>
- <li>Add-ons can break some of these guidelines if that's their intended purpose and there isn't malicious intent (
- <i>
- e.g.,</i>
- a security exploit proof of concept).</li>
- <li>Add-ons deployed by administrators within workplaces, schools, kiosks, and so forth, are exempt from most guidelines.</li>
- <li>As add-ons can only run clean up code if they are uninstalled while Firefox is running and they are enabled, we do not require that they attempt to clean up after themselves when they are uninstalled under other circumstances. Application installers that configure Firefox without add-ons should revert any changes when uninstalled.</li>
- <li>Add-ons may leave behind preferences changes in private preference branches which do not affect Firefox when the add-on is not active, so that any previous add-on configuration is not lost if the user decides to re-install the add-on in the future.</li>
-</ul>
-<p>Other exceptions may apply.</p>
-<h2 id="Enforcement">Enforcement</h2>
-<p>Add-ons that do not follow these guidelines may qualify for blocklisting, depending on the extent of the violations. Guidelines qualified with the word
- <i>
- must</i>
- are especially important, and violations thereof will most likely result in a blocklisting nomination.</p>
-<p>The Add-ons Team will do their best to contact the add-on's developers and provide a reasonable time frame for the problems to be corrected before a block is put in place. If an add-on is considered malicious or its developers have proven unreachable or unresponsive, or in case of repeat violations, blocklisting may be immediate.</p>
-<p>Guideline violations should be <a class="external text" href="https://bugzilla.mozilla.org/enter_bug.cgi?product=Tech%20Evangelism&amp;component=Add-ons" rel="nofollow">reported via Bugzilla</a>, under Tech Evangelism &gt; Add-ons. Questions can be posted in the <a class="external text" href="irc://irc.mozilla.org/addons" rel="nofollow">#addons IRC channel</a>.</p>
-<p>These guidelines may change in the future. All updates will be announced in the <a class="external text" href="https://blog.mozilla.org/addons/" rel="nofollow">Add-ons Blog</a>.</p>
diff --git a/files/zh-tw/mozilla/add-ons/amo/index.html b/files/zh-tw/mozilla/add-ons/amo/index.html
deleted file mode 100644
index 3857ed65ca..0000000000
--- a/files/zh-tw/mozilla/add-ons/amo/index.html
+++ /dev/null
@@ -1,9 +0,0 @@
----
-title: AMO
-slug: Mozilla/Add-ons/AMO
-tags:
- - NeedsTranslation
- - TopicStub
-translation_of: Mozilla/Add-ons/AMO
----
-<p>Content to be added.</p>
diff --git a/files/zh-tw/mozilla/add-ons/amo/policy/index.html b/files/zh-tw/mozilla/add-ons/amo/policy/index.html
deleted file mode 100644
index 8ac1738387..0000000000
--- a/files/zh-tw/mozilla/add-ons/amo/policy/index.html
+++ /dev/null
@@ -1,21 +0,0 @@
----
-title: AMO 政策
-slug: Mozilla/Add-ons/AMO/Policy
-tags:
- - NeedsTranslation
- - TopicStub
-translation_of: Mozilla/Add-ons/AMO/Policy
----
-<p>{{AddonSidebar}}</p>
-
-<p>Mozilla 致力於確保套件的用戶與開發者,都有著良好的體驗。提交套件以前,請閱讀以下政策。</p>
-
-<dl>
- <dd></dd><dt><a href="/Mozilla/Add-ons/AMO/Policy/Agreement">Developer Agreement</a></dt>
-<dd>Effective January 5, 2016</dd> <dt><a href="/Mozilla/Add-ons/AMO/Policy/Reviews">Review Process</a></dt>
-<dd>Add-ons extend the core capabilities of Firefox, allowing users to modify and personalize their Web experience. A healthy add-on ecosystem, built on trust, is vital for developers to be successful and users to feel safe making Firefox their own. For these reasons, Mozilla requires all add-ons to comply with the following set of policies on acceptable practices. The below is not intended to serve as legal advice, nor is it intended to serve as a comprehensive list of terms to include in your add-on’s privacy policy.</dd> <dt><a href="/Mozilla/Add-ons/AMO/Policy/Featured">Featured Add-ons</a></dt>
-<dd>How up-and-coming add-ons become featured and what's involved in the process. </dd> <strong><a href="/zh-TW/Add-ons#Contact_us">聯絡我們</a></strong>
-
- <p>如何就這些套件的政策,與我們取得聯繫</p>
-
-</dl>
diff --git a/files/zh-tw/mozilla/add-ons/amo/policy/聯絡資訊/index.html b/files/zh-tw/mozilla/add-ons/amo/policy/聯絡資訊/index.html
deleted file mode 100644
index 7358e5f642..0000000000
--- a/files/zh-tw/mozilla/add-ons/amo/policy/聯絡資訊/index.html
+++ /dev/null
@@ -1,24 +0,0 @@
----
-title: 附加元件聯絡資訊
-slug: Mozilla/Add-ons/AMO/Policy/聯絡資訊
-translation_of: Mozilla/Add-ons#Contact_us
----
-<p>誠摯的感謝您連絡 Mozilla 附加元件團隊,淺請先閱讀本頁說明以確保您的訊息被正確的遞送。</p>
-
-<h4 id="附加元件支援服務">附加元件支援服務</h4>
-
-<p>若你需要特定附加元件的支援訊息,比如說 "我該如何使用這個附加元件?" 或 "它怎麼不能...?",請透過列於附加元建列表中的聯絡方式,聯絡該附加元件的開發者。</p>
-
-<h4 id="附加元件編輯者審閱">附加元件編輯者審閱</h4>
-
-<p>若你有任何關於某個附加元件的編輯者審閱(Editor's review)的疑問,或想回報政策違反,請 E-mail 至 <a href="mailto:amo-editors@mozilla.org">amo-editors@mozilla.org</a>。<strong>Almost all add-on reports fall under this category.</strong> Please be sure to include a link to the add-on in question and a detailed description of your question or comment.</p>
-
-<h4 id="Add-on_Security_Vulnerabilities">Add-on Security Vulnerabilities</h4>
-
-<p>If you have discovered a security vulnerability in an add-on, even if it is not hosted here, Mozilla is very interested in your discovery and will work with the add-on developer to correct the issue as soon as possible. Add-on security issues can be reported <a href="http://www.mozilla.org/projects/security/security-bugs-policy.html">confidentially</a> in <a href="https://bugzilla.mozilla.org/enter_bug.cgi?product=addons.mozilla.org&amp;component=Add-on%20Security&amp;maketemplate=Add-on%20Security%20Bug&amp;bit-23=1&amp;rep_platform=All&amp;op_sys=All">Bugzilla</a> or by emailing <a href="mailto:amo-admins@mozilla.org">amo-admins@mozilla.org</a>.</p>
-
-<h4 id="Website_Functionality_Development">Website Functionality &amp; Development</h4>
-
-<p>If you've found a problem with the site, we'd love to fix it. Please <a href="https://bugzilla.mozilla.org/enter_bug.cgi?product=addons.mozilla.org">file a bug report</a> in Bugzilla, including the location of the problem and how you encountered it.</p>
-
-<p><span class="comment seoSummary">How to get in touch with us regarding these policies or your add-on. </span></p>
diff --git a/files/zh-tw/mozilla/add-ons/firefox_for_android/api/index.html b/files/zh-tw/mozilla/add-ons/firefox_for_android/api/index.html
deleted file mode 100644
index a8e6ebf9e0..0000000000
--- a/files/zh-tw/mozilla/add-ons/firefox_for_android/api/index.html
+++ /dev/null
@@ -1,30 +0,0 @@
----
-title: API
-slug: Mozilla/Add-ons/Firefox_for_Android/API
-tags:
- - NeedsTranslation
- - TopicStub
-translation_of: Archive/Add-ons/Legacy_Firefox_for_Android/API
----
-<p>There are a couple of differences between desktop Firefox and Firefox for Android that are particularly relevant to add-on developers:</p>
-
-<ul>
- <li>there is no visible XUL in the user interface, so you can't use XUL overlays to create your add-on's UI</li>
- <li>the <a href="https://developer.mozilla.org/en-US/docs/Code_snippets/Tabbed_browser" title="https://developer.mozilla.org/en-US/docs/Code_snippets/Tabbed_browser"><code>gBrowser</code></a> object does not exist, so you can't use <a href="https://developer.mozilla.org/en-US/docs/XUL/tabbrowser" title="https://developer.mozilla.org/en-US/docs/XUL/tabbrowser"><code>tabbrowser</code></a> to interact with browser tabs</li>
-</ul>
-
-<p>Instead, Firefox for Android provides its own APIs:</p>
-
-<ul>
- <li><a href="/en-US/docs/Extensions/Mobile/API/NativeWindow" title="/en-US/docs/DOM/en/Extensions/Mobile/API/NativeWindow"><code>NativeWindow</code></a> enables you to manipulate parts of the native Android UI</li>
- <li><a href="/en-US/docs/Extensions/Mobile/API/BrowserApp" title="/en-US/docs/Extensions/Mobile/API/BrowserApp"><code>BrowserApp</code></a> enables you to interact with browser tabs</li>
- <li><a href="/en-US/Add-ons/Firefox_for_Android/API/PageActions.jsm">PageActions.jsm</a> allows you to add buttons to the urlbar. {{fx_minversion_inline("34")}}</li>
- <li><a href="/en-US/docs/Extensions/Mobile/API/Prompt.jsm" title="/en-US/docs/Extensions/Mobile/API/Prompt.jsm"><code>Prompt.jsm</code></a> allows you to easily show native prompts, dialogs, menus, and lists</li>
- <li><a href="/en-US/docs/Extensions/Mobile/API/Notifications.jsm"><code>Notifications.jsm</code></a> allows you to handle system notifcations</li>
- <li><a href="/en-US/docs/Extensions/Mobile/API/Home.jsm" title="/en-US/docs/Extensions/Mobile/API/Prompt.jsm"><code>Home.jsm</code></a> allows you to customize the home page</li>
- <li><a href="/en-US/Add-ons/Firefox_for_Android/API/HomeProvider.jsm" title="/en-US/docs/Extensions/Mobile/API/Prompt.jsm"><code>HomeProvider.jsm</code></a> allows you to store data to show on the home page</li>
- <li><a href="/en-US/Add-ons/Firefox_for_Android/API/Accounts.jsm" title="/en-US/docs/Extensions/Mobile/API/Prompt.jsm"><code>Accounts.jsm</code></a> allows you to start the Firefox Account set-up process</li>
- <li><a href="/en-US/Add-ons/Firefox_for_Android/API/JavaAddonManager.jsm" title="/en-US/docs/Extensions/Mobile/API/Prompt.jsm"><code>JavaAddonManager.jsm</code></a> allows you to dynamically load and interface with compiled Java code. {{fx_minversion_inline("42")}}</li>
-</ul>
-
-<p>In these pages we've documented the main functions and properties exposed by these objects. To see all the details, refer to the code at <a class="external" href="http://mxr.mozilla.org/mozilla-central/source/mobile/android/chrome/content/browser.js" title="http://mxr.mozilla.org/mozilla-central/source/mobile/android/chrome/content/browser.js"><code>browser.js</code></a>.</p>
diff --git a/files/zh-tw/mozilla/add-ons/firefox_for_android/index.html b/files/zh-tw/mozilla/add-ons/firefox_for_android/index.html
deleted file mode 100644
index 8ade48ff37..0000000000
--- a/files/zh-tw/mozilla/add-ons/firefox_for_android/index.html
+++ /dev/null
@@ -1,70 +0,0 @@
----
-title: Extensions for Firefox for Android
-slug: Mozilla/Add-ons/Firefox_for_Android
-tags:
- - NeedsTranslation
- - TopicStub
-translation_of: Archive/Add-ons/Legacy_Firefox_for_Android
----
-<p>Firefox for Android supports add-ons using the same <a href="/en-US/Add-ons" title="en/Extensions">extension system</a> used by all other Gecko-based applications. You can use the <a href="https://addons.mozilla.org/en-US/developers/docs/sdk/latest/dev-guide/tutorials/mobile.html">Add-on SDK</a> or build <a href="/en-US/Add-ons/Bootstrapped_extensions">manually bootstrapped restartless add-ons</a>. You can even develop traditional restart-required add-ons, although the other two approaches are preferable.</p>
-
-<p>Add-ons that work with desktop Firefox <strong>do not</strong> automatically work in Firefox for Android:</p>
-
-<ul>
- <li>There is no visible XUL in the UI, so you can't use an overlay to create the UI.</li>
- <li>Internal code and objects, like <code>gBrowser</code>, do not exist. Look at the Firefox on Android <a class="external" href="http://mxr.mozilla.org/mozilla-central/source/mobile/android/chrome/content/browser.js" title="http://mxr.mozilla.org/mozilla-central/source/mobile/android/chrome/content/browser.js"><code>browser.js</code></a> file to learn about the internals. Much of the same fundamental functionality exists.</li>
- <li>Services like <code>nsIPromptService</code> and <code>nsIAlertsService</code> are implemented to use native Android UI.</li>
- <li>There is a simple JavaScript object, called <a href="https://developer.mozilla.org/en/Extensions/Mobile/API/NativeWindow" title="en/Extensions/Mobile/NativeWindow"><code>NativeWindow</code></a>, that allows you to manipulate parts of the native Android UI.</li>
-</ul>
-
-<p>The following articles provide help with developing extensions for Firefox on Android. In addition, please refer to the <a class="internal" href="/en-US/Add-ons" title="En/Extensions">general extension documentation</a> that applies to all Mozilla applications.</p>
-
-<div class="column-container">
-<div class="column-half">
-<h3 id="Tutorials">Tutorials</h3>
-
-<dl>
- <dt><a href="/en-US/Add-ons/Firefox_for_Android/Walkthrough">Walkthrough</a></dt>
- <dd>Developing, packaging and installing a simple add-on for Firefox for Android.</dd>
- <dt><a href="/en-US/Add-ons/Firefox_for_Android/Firefox_Hub_Walkthrough">Firefox Hub Walkthrough</a></dt>
- <dd>How to develop a Firefox Hub add-on to add content to the Firefox for Android home page.</dd>
- <dt><a href="/en-US/Add-ons/SDK/Tutorials/Mobile_development">Add-on SDK</a></dt>
- <dd>How to develop Firefox for Android add-ons using the Add-on SDK.</dd>
-</dl>
-
-<h3 id="Sample_code">Sample code</h3>
-
-<dl>
- <dt><a href="/en-US/Add-ons/Firefox_for_Android/Code_snippets">Code Snippets</a></dt>
- <dd>Code samples for common tasks.</dd>
- <dt><a href="/en-US/Add-ons/Firefox_for_Android/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 href="https://github.com/mozilla/firefox-for-android-addons">Firefox for Android Add-ons Github Repo</a></dt>
- <dd>A collection of JS modules, sample code, and boilerplate repos to help you build add-ons for Firefox for Android.</dd>
-</dl>
-</div>
-
-<div class="column-half">
-<h3 id="API_reference">API reference</h3>
-
-<dl>
- <dt><a class="internal" href="/en-US/Add-ons/Firefox_for_Android/API/NativeWindow">NativeWindow</a></dt>
- <dd>Create native Android UI widgets.</dd>
- <dt><a href="/en-US/Add-ons/Firefox_for_Android/API/BrowserApp">BrowserApp</a></dt>
- <dd>Access browser tabs and the web content they host.</dd>
- <dt><a class="internal" href="/en-US/Add-ons/Firefox_for_Android/API/Prompt.jsm">Prompt.jsm</a></dt>
- <dd>Show native Android dialogs.</dd>
- <dt><a href="/en-US/Add-ons/Firefox_for_Android/API/HelperApps.jsm">HelperApps.jsm</a></dt>
- <dd>Query and launch native apps installed on the system.</dd>
- <dt><a href="/en-US/Add-ons/Firefox_for_Android/API/Notifications.jsm">Notifications.jsm</a></dt>
- <dd>Use extended properties for Android system notifications.</dd>
- <dt><a href="/en-US/Add-ons/Firefox_for_Android/API/Home.jsm">Home.jsm</a></dt>
- <dd>Customize the home page.</dd>
- <dt><a href="/en-US/Add-ons/Firefox_for_Android/API/HomeProvider.jsm">HomeProvider.jsm</a></dt>
- <dd>Store data to display on the home page.</dd>
- <dt> </dt>
-</dl>
-</div>
-</div>
-
-<p> </p>
diff --git a/files/zh-tw/mozilla/add-ons/sdk/builder/index.html b/files/zh-tw/mozilla/add-ons/sdk/builder/index.html
deleted file mode 100644
index f7dc93a009..0000000000
--- a/files/zh-tw/mozilla/add-ons/sdk/builder/index.html
+++ /dev/null
@@ -1,13 +0,0 @@
----
-title: Builder
-slug: Mozilla/Add-ons/SDK/Builder
-translation_of: Archive/Add-ons/Add-on_SDK/Builder
----
-<p>Add-on Builder 是 Web-based 的開發環境,讓開發者能以 SDK API 來開發附加元件,而不必使用 <code>cfx</code> 命令列工具。Add-on Builder 已經於 2014 年 4 月 1 日下架,而原本的網址「builder.addons.mozilla.org」則轉至此頁。<br>
- <br>
- 若您過去使用 Builder 來開發採用 SDK 的附加元件,便已獲得絕大部分以 SDK 直接開發的必備知識。Builder 中的 <a href="/Mozilla/Add-ons/SDK/High-Level_APIs">high-level</a> 與 <a href="/Mozilla/Add-ons/SDK/Low-Level_APIs">low-level</a> API,就跟 SDK 裡的一模一樣。改用 SDK 很簡單:</p>
-<ul>
- <li><a href="/Mozilla/Add-ons/SDK/Tutorials/Installation">首先在您的電腦上安裝 SDK</a></li>
- <li>閱讀<a href="/Mozilla/Add-ons/SDK/Tutorials/Getting_started">入門文件</a>與 <a href="/Mozilla/Add-ons/SDK/Tools/cfx"><code>cfx</code> 參考文件</a>,學習使用 cfx 命令列工具</li>
- <li>深入了解 <a href="/Mozilla/Add-ons/SDK/Tools/package_json">package.json</a> 檔,以便設定附加原件的屬性</li>
-</ul>
diff --git a/files/zh-tw/mozilla/add-ons/sdk/guides/index.html b/files/zh-tw/mozilla/add-ons/sdk/guides/index.html
deleted file mode 100644
index f4e37d9e10..0000000000
--- a/files/zh-tw/mozilla/add-ons/sdk/guides/index.html
+++ /dev/null
@@ -1,115 +0,0 @@
----
-title: Guides
-slug: Mozilla/Add-ons/SDK/Guides
-translation_of: Archive/Add-ons/Add-on_SDK/Guides
----
-<p>This page lists more theoretical in-depth articles about the SDK.</p>
-<hr>
-<h3 id="Contributor's_guide"><a name="contributors-guide">Contributor's guide</a></h3>
-<div class="column-container">
- <div class="column-half">
- <dl>
- <dt>
- <a href="Guides/Getting_Started">Getting Started</a></dt>
- <dd>
- Learn how to contribute to the SDK: getting the code, opening/taking a bug, filing a patch, getting reviews, and getting help.</dd>
- <dt>
- <a href="Guides/Modules">Modules</a></dt>
- <dd>
- Learn about the module system used by the SDK (which is based on the CommonJS specification), how sandboxes and compartments can be used to improve security, and about the built-in SDK module loader, known as Cuddlefish.</dd>
- <dt>
- <a href="Guides/Classes_and_Inheritance">Classes and Inheritance</a></dt>
- <dd>
- Learn how classes and inheritance can be implemented in JavaScript, using constructors and prototypes, and about the helper functions provided by the SDK to simplify this.</dd>
- </dl>
- </div>
- <div class="column-half">
- <dl>
- <dt>
- <a href="Guides/Private_Properties">Private Properties</a></dt>
- <dd>
- Learn how private properties can be implemented in JavaScript using prefixes, closures, and WeakMaps, and how the SDK supports private properties by using namespaces (which are a generalization of WeakMaps).</dd>
- <dt>
- <a href="Guides/Content_Processes">Content Processes</a></dt>
- <dd>
- The SDK was designed to work in an environment where the code to manipulate web content runs in a different process from the main add-on code. This article highlights the main features of that design.</dd>
- </dl>
- </div>
-</div>
-<hr>
-<h3 id="SDK_infrastructure"><a name="sdk-infrastructure">SDK infrastructure</a></h3>
-<div class="column-container">
- <div class="column-half">
- <dl>
- <dt>
- <a href="Guides/Module_structure_of_the_SDK">Module structure of the SDK</a></dt>
- <dd>
- The SDK, and add-ons built using it, are of composed from reusable JavaScript modules. This explains what these modules are, how to load modules, and how the SDK's module tree is structured.</dd>
- <dt>
- <a href="Guides/SDK_API_Lifecycle">SDK API lifecycle</a></dt>
- <dd>
- Definition of the lifecycle for the SDK's APIs, including the stability ratings for APIs.</dd>
- </dl>
- </div>
- <div class="column-half">
- <dl>
- <dt>
- <a href="Guides/Program_ID">Program ID</a></dt>
- <dd>
- The Program ID is a unique identifier for your add-on. This guide explains how it's created, what it's used for and how to define your own.</dd>
- <dt>
- <a href="Guides/Firefox_Compatibility">Firefox compatibility</a></dt>
- <dd>
- Working out which Firefox releases a given SDK release is compatible with, and dealing with compatibility problems.</dd>
- </dl>
- </div>
-</div>
-<hr>
-<h3 id="SDK_idioms"><a name="sdk-idioms">SDK idioms</a></h3>
-<div class="column-container">
- <div class="column-half">
- <dl>
- <dt>
- <a href="Guides/Working_with_Events">Working With Events</a></dt>
- <dd>
- Write event-driven code using the the SDK's event emitting framework.</dd>
- <dt>
- <a href="Guides/Content_Scripts">Content scripts guide</a></dt>
- <dd>
- An overview of content scripts, including: what they are, what they can do, how to load them, how to communicate with them.</dd>
- </dl>
- </div>
- <div class="column-half">
- <dl>
- <dt>
- <a href="Guides/Two_Types_of_Scripts">Two Types of Scripts</a></dt>
- <dd>
- This article explains the differences between the APIs available to your main add-on code and those available to content scripts.</dd>
- </dl>
- </div>
-</div>
-<hr>
-<h3 id="XUL_migration"><a name="xul-migration">XUL migration</a></h3>
-<div class="column-container">
- <div class="column-half">
- <dl>
- <dt>
- <a href="Guides/XUL_Migration_Guide">XUL Migration Guide</a></dt>
- <dd>
- Techniques to help port a XUL add-on to the SDK.</dd>
- <dt>
- <a href="Guides/XUL_vs_SDK">XUL versus the SDK</a></dt>
- <dd>
- A comparison of the strengths and weaknesses of the SDK, compared to traditional XUL-based add-ons.</dd>
- </dl>
- </div>
- <div class="column-half">
- <dl>
- <dt>
- <a href="Guides/Porting_the_Library_Detector">Porting Example</a></dt>
- <dd>
- A walkthrough of porting a relatively simple XUL-based add-on to the SDK.</dd>
- </dl>
- </div>
-</div>
-<p> </p>
diff --git a/files/zh-tw/mozilla/add-ons/sdk/high-level_apis/context-menu/index.html b/files/zh-tw/mozilla/add-ons/sdk/high-level_apis/context-menu/index.html
deleted file mode 100644
index 42c5e0ca85..0000000000
--- a/files/zh-tw/mozilla/add-ons/sdk/high-level_apis/context-menu/index.html
+++ /dev/null
@@ -1,588 +0,0 @@
----
-title: context-menu
-slug: Mozilla/Add-ons/SDK/High-Level_APIs/context-menu
-translation_of: Archive/Add-ons/Add-on_SDK/High-Level_APIs/context-menu
----
-<div class="note">
- <p>Stable</p>
-</div>
-<p><span class="seoSummary">加入選單項目、子選單、選單分隔線到頁面右鍵選單。</span></p>
-<h2 id="用法">用法</h2>
-<p>Instead of manually adding items when particular contexts occur and then removing them when those contexts go away, you <em>bind</em> items to contexts, and the adding and removing is automatically handled for you. Items are bound to contexts in much the same way that event listeners are bound to events. When the user invokes the context menu, all of the items bound to the current context are automatically added to the menu. If no items are bound, none are added. Likewise, any items that were previously in the menu but are not bound to the current context are automatically removed from the menu. You never need to manually remove your items from the menu unless you want them to never appear again.</p>
-<p>For example, if your add-on needs to add a context menu item whenever the user visits a certain page, don't create the item when that page loads, and don't remove it when the page unloads. Rather, create your item only once and supply a context that matches the target URL.</p>
-<p>Context menu items are displayed in the order created or in the case of sub menus the order added to the sub menu. Menu items for each add-on will be grouped together automatically. If the total number of menu items in the main context menu from all add-ons exceeds a certain number (normally 10 but configurable with the <code>extensions.addon-sdk.context-menu.overflowThreshold</code> preference) all of the menu items will instead appear in an overflow menu to avoid making the context menu too large.</p>
-<h3 id="Specifying_Contexts">Specifying Contexts</h3>
-<p>As its name implies, the context menu should be reserved for the occurrence of specific contexts. Contexts can be related to page content or the page itself, but they should never be external to the page.</p>
-<p>For example, a good use of the menu would be to show an "Edit Image" item when the user right-clicks an image in the page. A bad use would be to show a submenu that listed all the user's tabs, since tabs aren't related to the page or the node the user clicked to open the menu.</p>
-<h4 id="The_Page_Context">The Page Context</h4>
-<p>First of all, you may not need to specify a context at all. When a top-level item does not specify a context, the page context applies. An item that is in a submenu is visible unless you specify a context.</p>
-<p>The <em>page context</em> occurs when the user invokes the context menu on a non-interactive portion of the page. Try right-clicking a blank spot in this page, or on text. Make sure that no text is selected. The menu that appears should contain the items "Back", "Forward", "Reload", "Stop", and so on. This is the page context.</p>
-<p>The page context is appropriate when your item acts on the page as a whole. It does not occur when the user invokes the context menu on a link, image, or other non-text node, or while a selection exists.</p>
-<h4 id="宣告式場景條件(Declarative_Contexts)">宣告式場景條件(Declarative Contexts)</h4>
-<p>當你藉由設定 <code>context</code> 屬性(該屬性為: 傳給 constructor 的選項物件之屬性)來新增選單項目時,你可以指定一些簡單的宣告式場景條件, 如下:</p>
-<pre class="brush: js">var cm = require("sdk/context-menu");
-cm.Item({
- label: "My Menu Item",
- context: cm.URLContext("*.mozilla.org")
-});</pre>
-<table class="standard-table">
- <tbody>
- <tr>
- <th>Constructor</th>
- <th>選單項目出現的條件</th>
- </tr>
- <tr>
- <td><code>PageContext() </code></td>
- <td>當場景為網頁時.</td>
- </tr>
- <tr>
- <td><code>SelectionContext() </code></td>
- <td>當使用者在網頁上選取項目時.</td>
- </tr>
- <tr>
- <td><code>SelectorContext(selector) </code></td>
- <td>當選單在符合下述條件之一的節點上顯示: <code>selector</code>匹配, CSS 選擇器, 或 其祖先節點匹配選擇器. <code>selector</code>可以有多個(以逗點分隔), 例如, <code>"a[href], img"</code>.</td>
- </tr>
- <tr>
- <td><code>URLContext(matchPattern) </code></td>
- <td>特定網址的網頁. <code>matchPattern</code> is a match pattern string or an array of match pattern strings. 當 <code>matchPattern</code> 是陣列, 網址符合任何陣列元素之一時. These are the same match pattern strings that you use with the <a href="/en-US/Add-ons/SDK/High-Level_APIs/page-mod"><code>page-mod</code></a> <code>include</code> property. <a href="/en-US/Add-ons/SDK/Low-Level_APIs/util_match-pattern">Read more about patterns</a>.</td>
- </tr>
- <tr>
- <td><code>PredicateContext(predicateFunction)</code></td>
- <td>當選單被觸發時,<code>predicateFunction</code> 函數被呼叫,若函數傳回值為真值,則選單項目顯示。這函數傳入一物件,物件有著描述選單觸發場景條件的屬性.</td>
- </tr>
- <tr>
- <td>array</td>
- <td>An array of any of the other types. This context occurs when all contexts in the array occur.</td>
- </tr>
- </tbody>
-</table>
-<p>選單項目也有 <code>context</code> 屬性,可以用在新增或移除宣告式場景條件,當建構後. 例如:</p>
-<pre class="brush: js">var context = require("sdk/context-menu").SelectorContext("img");
-myMenuItem.context.add(context);
-myMenuItem.context.remove(context);</pre>
-<p>當選單項目被指定了多個場景條件, 選單項目顯示於所有場景條件皆成立時.</p>
-<h3 id="In_Content_Scripts">In Content Scripts</h3>
-<p>宣告式場景條件很容易使用,但功能不強. 舉例來說, 你希望選單項目出現的條件為:「有著至少一張圖片的頁面」, 但宣告式場景條件並不能達成這一點.</p>
-<p>當你需要對選單項目的出現時機有著更多的控制, 你可以使用 content scripts. 如同 SDK 的其他 APIs 一樣, <code>context-menu</code> API 使用 <a href="/en-US/Add-ons/SDK/Guides/Content_Scripts">content scripts</a> 以讓你的附加元件與瀏覽器中的頁面互動. 在最上層選單的每一個選單項目可以使用 content script.</p>
-<p>每當選單即將顯示時,一個特殊事件,其名為 <code>"context"</code> ,觸發於你的 content scripts. 如果你為這個事件註冊了偵聽(listener)函數,當函數傳回真值時, 與偵聽函數關聯的選單項目會被顯示於選單中.</p>
-<p>下例中, 當選單觸發於「有著至少一張圖片的頁面」時,顯示選單項目.</p>
-<pre class="brush: js">require("sdk/context-menu").Item({
- label: "This Page Has Images",
- contentScript: 'self.on("context", function (node) {' +
- ' return !!document.querySelector("img");' +
- '});'
-});</pre>
-<p>需要注意的是偵聽函數有一個參數叫 <code>node</code>. 這個 node 指的是使用者在頁面上按右鍵來觸發選單的頁面觸發節點. 你可以使用它來決定是否要顯示選單項目.</p>
-<p>你可以在 content script 中,同時指定宣告式場景條件和 context 偵聽函數. 在這種情況下, 先評估宣告式場景條件, 然後你的選單項目顯示條件為:所有宣告式場景條件成立,並且你的 context 偵聽函數傳回真值.</p>
-<p>如果任一宣告式場景條件未成立, 那麼你的 context 偵聽函數不會被呼叫. 下面的例子利用了這點. 確保了偵聽函數只在 image <code>node</code> 上觸發選單時,才會被呼叫:</p>
-<pre class="brush: js">var cm = require("sdk/context-menu");
-cm.Item({
- label: "A Mozilla Image",
- context: cm.SelectorContext("img"),
- contentScript: 'self.on("context", function (node) {' +
- ' return /mozilla/.test(node.src);' +
- '});'
-});</pre>
-<p>However, if you do combine <code>SelectorContext</code> and the <code>"context"</code> event, be aware that the <code>node</code> argument passed to the <code>"context"</code> event will not always match the type specified in <code>SelectorContext</code>.</p>
-<p><code>SelectorContext</code> will match if the menu is invoked on the node specified <em>or any descendant of that node</em>, but the <code>"context"</code> event handler is passed <em>the actual node</em> on which the menu was invoked. 上個例子有作用,是因為 <code>&lt;IMG&gt;</code> 元素內不能包含其他元素, 但底下的例子裡, <code>node.nodeName</code> 不能保證是 "P" - 例如說, 當使用者在一個段落(<code>&lt;P&gt;</code>)的連結(<code>&lt;A&gt;</code>)上點右鍵時,它不會是 "P" :</p>
-<pre class="brush: js">var cm = require("sdk/context-menu");
-cm.Item({
- label: "A Paragraph",
- context: cm.SelectorContext("p"),
- contentScript: 'self.on("context", function (node) {' +
- ' console.log(node.nodeName);' +
- ' return true;' +
- '});'
-});</pre>
-<p>The content script is executed for every page that a context menu is shown for. It will be executed the first time it is needed (i.e. 當右鍵選單第一次顯示,並且選單項目的所有宣告式場景條件皆成立時) ,接著處於作用中,直到你銷毀你的選單項目或者關閉頁面.</p>
-<h3 id="處理選單項目上的點擊">處理選單項目上的點擊</h3>
-<p>content script 除了上述所說的功能(用來偵聽 <code>"context"</code> 事件)以外,你可以使用 content script 來處理選單項目上的點擊. 當使用者點擊選單項目時,一個名為 <code>"click"</code> 的事件在選單項目的 content script 內被觸發.</p>
-<p>因此, 欲處理選單項目上的點擊, 可以藉由偵聽選單項目 content script 內的 <code>"click"</code> 事件, 如下:</p>
-<pre class="brush: js">require("sdk/context-menu").Item({
- label: "My Item",
- contentScript: 'self.on("click", function (node, data) {' +
- ' console.log("Item clicked!");' +
- '});'
-});</pre>
-<p>注意:偵聽函數有兩參數 <code>node</code> 和 <code>data</code>.</p>
-<h4 id="node_參數">"node" 參數</h4>
-<p><code>node</code> 是使用者右鍵點擊所觸發選單的節點.</p>
-<ul>
- <li>如果你未使用 <code>SelectorContext</code> 來決定是否顯示選單項目, 那麼這實際點擊的節點.</li>
- <li>如果你使用了 <code>SelectorContext</code>, 那麼這是符合你的選擇器的那個節點.</li>
-</ul>
-<p>例如, 假設你的附加元件看起來像這樣:</p>
-<pre class="brush: js">var script = "self.on('click', function (node, data) {" +
- " console.log('clicked: ' + node.nodeName);" +
- "});";
-
-var cm = require("sdk/context-menu");
-
-cm.Item({
- label: "body context",
- context: cm.SelectorContext("body"),
- contentScript: script
-});</pre>
-<p>這個附加元件建立了一個右鍵選單項目,該項目使用 <code>SelectorContext</code> 來顯示項目,顯示時機為:右鍵選單觸發於 <code>&lt;BODY&gt;</code> 元素的任何後代元素之上時. 點擊時, 項目記錄了 <a href="https://developer.mozilla.org/en-US/docs/DOM/Node.nodeName"><code>nodeName</code></a> 屬性(觸發選單的節點名稱)傳給點擊事件處理器.</p>
-<p>如果你執行這個附加元件,你將看到它總是記錄 "BODY", 即使你點擊的是頁面上的段落元素<code>&lt;P&gt;</code>:</p>
-<pre>info: contextmenu-example: clicked: BODY</pre>
-<p>與上面對比, 底下的附加元件使用了 <code>PageContext</code>:</p>
-<pre class="brush: js">var script = "self.on('click', function (node, data) {" +
- " console.log('clicked: ' + node.nodeName);" +
- "});";
-
-var cm = require("sdk/context-menu");
-
-cm.Item({
- label: "body context",
- context: cm.PageContext(),
- contentScript: script
-});</pre>
-<p>它將記錄實際點擊的節點名稱:</p>
-<pre>info: contextmenu-example: clicked: P</pre>
-<h4 id="data_參數">"data" 參數</h4>
-<p><code>data</code> 是使用者所點擊選單項目的 <code>data</code>屬性. 注意: 當你有一個多層的選單(項目)時,點擊事件會被傳給被點擊的項目的所有祖先(項目),所以一定要驗證 <code>data</code> 值傳給你所期待的項目. 你可以使用 "data" 參數來簡化點擊事件處理 by providing just a single click listener on a <code>Menu</code> that reacts to clicks for any child items.:</p>
-<pre class="brush: js">var cm = require("sdk/context-menu");
-cm.Menu({
- label: "My Menu",
- contentScript: 'self.on("click", function (node, data) {' +
- ' console.log("You clicked " + data);' +
- '});',
- items: [
- cm.Item({ label: "Item 1", data: "item1" }),
- cm.Item({ label: "Item 2", data: "item2" }),
- cm.Item({ label: "Item 3", data: "item3" })
- ]
-});
-</pre>
-<h4 id="和附加元件通訊">和附加元件通訊</h4>
-<p>時常,你需要收集一些訊息,在點擊偵聽函數內和執行一個無關於頁面動作. 為了與關聯於 content script 的選單項目通訊, content script 可以呼叫附屬於全域 <code>self</code> 物件的 <code>postMessage</code> 函數, 傳給它一些 JSON-able 資料. 選單項目的 <code>"message"</code> 事件偵聽函數將被呼叫(前述的 JSON-able 資料作為參數傳入).</p>
-<pre class="brush: js">var cm = require("sdk/context-menu");
-cm.Item({
- label: "Edit Image",
- context: cm.SelectorContext("img"),
- contentScript: 'self.on("click", function (node, data) {' +
- ' self.postMessage(node.src);' +
- '});',
- onMessage: function (imgSrc) {
- openImageEditor(imgSrc);
- }
-});</pre>
-<h3 id="更新選單項目的文字標籤">更新選單項目的文字標籤</h3>
-<p>Each menu item must be created with a label, but you can change its label later using a couple of methods.</p>
-<p>最簡單的方法是設定選單項目的 <code>label</code> 屬性. 下面的例子更新選單項目的文字標籤為它被點擊的次數:</p>
-<pre class="brush: js">var numClicks = 0;
-var myItem = require("sdk/context-menu").Item({
- label: "Click Me: " + numClicks,
- contentScript: 'self.on("click", self.postMessage);',
- onMessage: function () {
- numClicks++;
- this.label = "Click Me: " + numClicks;
- // Setting myItem.label is equivalent.
- }
-});</pre>
-<p>Sometimes you might want to update the label based on the context. For instance, if your item performs a search with the user's selected text, it would be nice to display the text in the item to provide feedback to the user. 在這些情況下,你可以使用第二種方法 . 回想一下,你的 content scripts 可以偵聽 <code>"context"</code> 事件,如果你的偵聽函數傳回真值, 與 content scripts 關聯的選單項目會顯示在選單中. 除了傳回真值, 你的 <code>"context"</code> 偵聽函數也可以傳回字串. 當 <code>"context"</code> 偵聽函數傳回字串, 字串成為選單項目的新文字標籤.</p>
-<p>This item implements the aforementioned search example:</p>
-<pre class="brush: js">var cm = require("sdk/context-menu");
-cm.Item({
- label: "Search Google",
- context: cm.SelectionContext(),
- contentScript: 'self.on("context", function () {' +
- ' var text = window.getSelection().toString();' +
- ' if (text.length &gt; 20)' + // 若太長
- ' text = text.substr(0, 20) + "...";' + // 則截短
- ' return "Search Google for " + text;' + // 後綴到固定字串上傳回
- '});'
-});</pre>
-<p><code>"context"</code> 偵聽函數取得使用者所選取的文字, 如果字串太長則截短它, 並後綴到固定字串上傳回. 當選單項目顯示, 它的文字標籤將是 "Search Google for <code>text</code>", 此處的 <code>text</code> 是被截短的 使用者所選取的文字.</p>
-<h3 id="隱私視窗">隱私視窗</h3>
-<p>If your add-on has not opted into private browsing, then any menus or menu items that you add will not appear in context menus belonging to private browser windows.</p>
-<p>To learn more about private windows, how to opt into private browsing, and how to support private browsing, refer to the <a href="/en-US/Add-ons/SDK/High-Level_APIs/private-browsing">documentation for the <code>private-browsing</code> module</a>.</p>
-<h3 id="更多例子">更多例子</h3>
-<p>For conciseness, these examples create their content scripts as strings and use the <code>contentScript</code> property. In your own add-on, you will probably want to create your content scripts in separate files and pass their URLs using the <code>contentScriptFile</code> property. See <a href="/en-US/Add-ons/SDK/Guides/Content_Scripts">Working with Content Scripts</a> for more information.</p>
-<div class="warning">
- <p>Unless your content script is extremely simple and consists only of a static string, don't use <code>contentScript</code>: if you do, you may have problems getting your add-on approved on AMO.</p>
- <p>Instead, keep the script in a separate file and load it using <code>contentScriptFile</code>. This makes your code easier to maintain, secure, debug and review.</p>
-</div>
-<p>Show an "Edit Page Source" item when the user right-clicks a non-interactive part of the page:</p>
-<pre class="brush: js">require("sdk/context-menu").Item({
- label: "Edit Page Source",
- contentScript: 'self.on("click", function (node, data) {' +
- ' self.postMessage(document.URL);' +
- '});',
- onMessage: function (pageURL) {
- editSource(pageURL);
- }
-});</pre>
-<p>Show an "Edit Image" item when the menu is invoked on an image:</p>
-<pre class="brush: js">var cm = require("sdk/context-menu");
-cm.Item({
- label: "Edit Image",
- context: cm.SelectorContext("img"),
- contentScript: 'self.on("click", function (node, data) {' +
- ' self.postMessage(node.src);' +
- '});',
- onMessage: function (imgSrc) {
- openImageEditor(imgSrc);
- }
-});</pre>
-<p>Show an "Edit Mozilla Image" item when the menu is invoked on an image in a mozilla.org or mozilla.com page:</p>
-<pre class="brush: js">var cm = require("sdk/context-menu");
-cm.Item({
- label: "Edit Mozilla Image",
- context: [
- cm.URLContext(["*.mozilla.org", "*.mozilla.com"]),
- cm.SelectorContext("img")
- ],
- contentScript: 'self.on("click", function (node, data) {' +
- ' self.postMessage(node.src);' +
- '});',
- onMessage: function (imgSrc) {
- openImageEditor(imgSrc);
- }
-});</pre>
-<p>Show an "Edit Page Images" item when the page contains at least one image:</p>
-<pre class="brush: js">var cm = require("sdk/context-menu");
-cm.Item({
- label: "Edit Page Images",
- // This ensures the item only appears during the page context.
- context: cm.PageContext(),
- contentScript: 'self.on("context", function (node) {' +
- ' var pageHasImgs = !!document.querySelector("img");' +
- ' return pageHasImgs;' +
- '});' +
- 'self.on("click", function (node, data) {' +
- ' var imgs = document.querySelectorAll("img");' +
- ' var imgSrcs = [];' +
- ' for (var i = 0 ; i &lt; imgs.length; i++)' +
- ' imgSrcs.push(imgs[i].src);' +
- ' self.postMessage(imgSrcs);' +
- '});',
- onMessage: function (imgSrcs) {
- openImageEditor(imgSrcs);
- }
-});</pre>
-<p>Show a "Search With" menu when the user right-clicks an anchor that searches Google or Wikipedia with the text contained in the anchor:</p>
-<pre class="brush: js">var cm = require("sdk/context-menu");
-var googleItem = cm.Item({
- label: "Google",
- data: "http://www.google.com/search?q="
-});
-var wikipediaItem = cm.Item({
- label: "Wikipedia",
- data: "http://en.wikipedia.org/wiki/Special:Search?search="
-});
-var searchMenu = cm.Menu({
- label: "Search With",
- context: cm.SelectorContext("a[href]"),
- contentScript: 'self.on("click", function (node, data) {' +
- ' var searchURL = data + node.textContent;' +
- ' window.location.href = searchURL;' +
- '});',
- items: [googleItem, wikipediaItem]
-});</pre>
-<h2 id="Globals">Globals</h2>
-<h3 id="Constructors">Constructors</h3>
-<h4 class="addon-sdk-api-name" id="Item(options)"><code>Item(options)</code></h4>
-<p>建立一個有文字標籤的選單項目,當點擊它時,可以執行一些動作.</p>
-<h5 id="參數">參數</h5>
-<p><strong>options : 物件</strong><br>
- options 物件的必要屬性:</p>
-<table class="standard-table">
- <thead>
- <tr>
- <th scope="col">名稱</th>
- <th scope="col">型別</th>
- <th scope="col"> </th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>label</td>
- <td>字串</td>
- <td>
- <p>選單項目的文字標籤. It must either be a string or an object that implements <code>toString()</code>.</p>
- </td>
- </tr>
- </tbody>
-</table>
-<p>options 物件的可選屬性:</p>
-<table class="standard-table">
- <thead>
- <tr>
- <th scope="col">名稱</th>
- <th scope="col">型別</th>
- <th scope="col"> </th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>image</td>
- <td>字串</td>
- <td>
- <p>選單項目的圖示, a string URL. The URL can be remote, a reference to an image in the add-on's <code>data</code> directory, or a data URI.</p>
- </td>
- </tr>
- <tr>
- <td>data</td>
- <td>字串</td>
- <td>
- <p>An optional arbitrary value to associate with the item. It must be either a string or an object that implements <code>toString()</code>. It will be passed to click listeners.</p>
- </td>
- </tr>
- <tr>
- <td>accessKey</td>
- <td>只有單一字元的字串</td>
- <td>
- <div class="geckoVersionNote">
- <p>New in Firefox 35.</p>
- </div>
- <p>選單項目的快捷鍵. Pressing this key selects the item when the context menu is open.</p>
- </td>
- </tr>
- <tr>
- <td>context</td>
- <td>value</td>
- <td>
- <p>If the item is contained in the top-level context menu, this declaratively specifies the context under which the item will appear; see Specifying Contexts above.</p>
- </td>
- </tr>
- <tr>
- <td>contentScript</td>
- <td>字串, 陣列</td>
- <td>
- <p>If the item is contained in the top-level context menu, this is the content script or an array of content scripts that the item can use to interact with the page.</p>
- </td>
- </tr>
- <tr>
- <td>contentScriptFile</td>
- <td>字串, 陣列</td>
- <td>
- <p>If the item is contained in the top-level context menu, this is the local file URL of the content script or an array of such URLs that the item can use to interact with the page.</p>
- </td>
- </tr>
- <tr>
- <td>onMessage</td>
- <td>函數</td>
- <td>
- <p>If the item is contained in the top-level context menu, this function will be called when the content script calls <code>self.postMessage</code>. It will be passed the data that was passed to <code>postMessage</code>.</p>
- </td>
- </tr>
- </tbody>
-</table>
-<h4 class="addon-sdk-api-name" id="Menu(options)"><code>Menu(options)</code></h4>
-<p>建立一個有文字標籤的選單項目,用以展開子選單.</p>
-<h5 id="參數_2">參數</h5>
-<p><strong>options : 物件</strong><br>
- options 物件的必要屬性:</p>
-<table class="standard-table">
- <thead>
- <tr>
- <th scope="col">名稱</th>
- <th scope="col">型別</th>
- <th scope="col"> </th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>label</td>
- <td>字串</td>
- <td>
- <p>選單項目的文字標籤. It must either be a string or an object that implements <code>toString()</code>.</p>
- </td>
- </tr>
- <tr>
- <td>items</td>
- <td>陣列</td>
- <td>
- <p>選單項目構成的陣列,這些選單項目會被子選單所包含. 陣列中的元素須為 <code>Item</code>, <code>Menu</code>, 或 <code>Separator</code>.</p>
- </td>
- </tr>
- </tbody>
-</table>
-<p>options 物件的可選屬性:</p>
-<table class="standard-table">
- <thead>
- <tr>
- <th scope="col">名稱</th>
- <th scope="col">型別</th>
- <th scope="col"> </th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>image</td>
- <td>字串</td>
- <td>
- <p>The menu's icon, a string URL. The URL can be remote, a reference to an image in the add-on's <code>data</code> directory, or a data URI.</p>
- </td>
- </tr>
- <tr>
- <td>context</td>
- <td>value</td>
- <td>
- <p>If the menu is contained in the top-level context menu, this declaratively specifies the context under which the menu will appear; see Specifying Contexts above.</p>
- </td>
- </tr>
- <tr>
- <td>contentScript</td>
- <td>字串, 陣列</td>
- <td>
- <p>If the menu is contained in the top-level context menu, this is the content script or an array of content scripts that the menu can use to interact with the page.</p>
- </td>
- </tr>
- <tr>
- <td>contentScriptFile</td>
- <td>字串, 陣列</td>
- <td>
- <p>If the menu is contained in the top-level context menu, this is the local file URL of the content script or an array of such URLs that the menu can use to interact with the page.</p>
- </td>
- </tr>
- <tr>
- <td>onMessage</td>
- <td>函數</td>
- <td>
- <p>If the menu is contained in the top-level context menu, this function will be called when the content script calls <code>self.postMessage</code>. It will be passed the data that was passed to <code>postMessage</code>.</p>
- </td>
- </tr>
- </tbody>
-</table>
-<h4 class="addon-sdk-api-name" id="Separator()"><code>Separator()</code></h4>
-<p>Creates a menu separator.</p>
-<h4 class="addon-sdk-api-name" id="PageContext()"><code>PageContext()</code></h4>
-<p>Creates a page context. See Specifying Contexts above.</p>
-<h4 class="addon-sdk-api-name" id="SelectionContext()"><code>SelectionContext()</code></h4>
-<p>Creates a context that occurs when a page contains a selection. See Specifying Contexts above.</p>
-<h4 class="addon-sdk-api-name" id="SelectorContext(selector)"><code>SelectorContext(selector)</code></h4>
-<p>Creates a context that matches a given CSS selector. See Specifying Contexts above.</p>
-<h5 id="Parameters">Parameters</h5>
-<p><strong>selector : string</strong><br>
- A CSS selector.</p>
-<h4 class="addon-sdk-api-name" id="URLContext(matchPattern)"><code>URLContext(matchPattern)</code></h4>
-<p>Creates a context that matches pages with particular URLs. See Specifying Contexts above.</p>
-<h5 id="Parameters_2">Parameters</h5>
-<p><strong>matchPattern : string,array</strong><br>
- A <a href="/en-US/Add-ons/SDK/Low-Level_APIs/util_match-pattern">match pattern</a> string, regexp or an array of match pattern strings or regexps.</p>
-<h4 class="addon-sdk-api-name" id="PredicateContext(predicateFunction)"><code>PredicateContext(predicateFunction)</code></h4>
-<div class="geckoVersionNote">
- <p>New in Firefox 29</p>
-</div>
-<p>Creates a context that occurs when predicateFunction returns a true value. See Specifying Contexts above.</p>
-<h5 id="Parameters_3">Parameters</h5>
-<p><strong>predicateFunction : function(context)</strong><br>
- A function which will be called with an object argument that provide information about the invocation context. <code>context</code> object properties:</p>
-<table class="standard-table">
- <thead>
- <tr>
- <th scope="col">Property</th>
- <th scope="col">Description</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><code>documentType</code></td>
- <td>The MIME type of the document the menu was invoked in. E.g. <code>text/html</code> for HTML pages, <code>application/xhtml+xml</code> for XHTML, or <code>image/jpeg</code> if viewing an image directly.</td>
- </tr>
- <tr>
- <td><code>documentURL</code></td>
- <td>The URL of the document the menu was invoked in.</td>
- </tr>
- <tr>
- <td><code>targetName</code></td>
- <td>The name of the DOM element that the menu was invoked on, in lower-case.</td>
- </tr>
- <tr>
- <td><code>targetID</code></td>
- <td>The <code>id</code> attribute of the element that the menu was invoked on, or <code>null</code> if not set.</td>
- </tr>
- <tr>
- <td><code>isEditable</code></td>
- <td><code>true</code> if the menu was invoked in an editable element, and that element isn't disabled or read-only.  This includes non-input elements with the <code>contenteditable</code> attribute set to <code>true</code>.</td>
- </tr>
- <tr>
- <td><code>selectionText</code></td>
- <td>The current selection as a text string, or <code>null</code>. If the menu was invoked in an input text box or area, this is the selection of that element, otherwise the selection in the contents of the window.</td>
- </tr>
- <tr>
- <td><code>srcURL</code></td>
- <td>The <code>src</code> URL of the element that the menu was invoked on, or <code>null</code> if it doesn't have one.</td>
- </tr>
- <tr>
- <td><code>linkURL</code></td>
- <td>The <code>href</code> URL of the element that the menu was invoked on, or <code>null</code> if it doesn't have one.</td>
- </tr>
- <tr>
- <td><code>value</code></td>
- <td>The current contents of a input text box or area if the menu was invoked in one, <code>null</code> otherwise.</td>
- </tr>
- </tbody>
-</table>
-<h2 id="Item">Item</h2>
-<p>A labeled menu item that can perform an action when clicked.</p>
-<h3 id="Methods">Methods</h3>
-<h4 class="addon-sdk-api-name" id="destroy()"><code>destroy()</code></h4>
-<p>Permanently removes the item from its parent menu and frees its resources. The item must not be used afterward. If you need to remove the item from its parent menu but use it afterward, call <code>removeItem()</code> on the parent menu instead.</p>
-<h3 id="Properties">Properties</h3>
-<h4 class="addon-sdk-api-name" id="label"><code>label</code></h4>
-<p>The menu item's label. You can set this after creating the item to update its label later.</p>
-<h4 class="addon-sdk-api-name" id="image"><code>image</code></h4>
-<p>The item's icon, a string URL. The URL can be remote, a reference to an image in the add-on's <code>data</code> directory, or a data URI. You can set this after creating the item to update its image later. To remove the item's image, set it to <code>null</code>.</p>
-<h4 class="addon-sdk-api-name" id="data"><code>data</code></h4>
-<p>An optional arbitrary value to associate with the item. It must be either a string or an object that implements <code>toString()</code>. It will be passed to click listeners. You can set this after creating the item to update its data later.</p>
-<h4 class="addon-sdk-api-name" id="context"><code>context</code></h4>
-<p>A list of declarative contexts for which the menu item will appear in the context menu. Contexts can be added by calling <code>context.add()</code> and removed by called <code>context.remove()</code>.</p>
-<h4 class="addon-sdk-api-name" id="parentMenu"><code>parentMenu</code></h4>
-<p>The item's parent <code>Menu</code>, or <code>null</code> if the item is contained in the top-level context menu. This property is read-only. To add the item to a new menu, call that menu's <code>addItem()</code> method.</p>
-<h4 class="addon-sdk-api-name" id="contentScript"><code>contentScript</code></h4>
-<p>The content script or the array of content scripts associated with the menu item during creation.</p>
-<h4 class="addon-sdk-api-name" id="contentScriptFile"><code>contentScriptFile</code></h4>
-<p>The URL of a content script or the array of such URLs associated with the menu item during creation.</p>
-<h3 id="Events">Events</h3>
-<h4 class="addon-sdk-api-name" id="message"><code>message</code></h4>
-<p>If you listen to this event you can receive message events from content scripts associated with this menu item. When a content script posts a message using <code>self.postMessage()</code>, the message is delivered to the add-on code in the menu item's <code>message</code> event.</p>
-<h5 id="Arguments">Arguments</h5>
-<p><strong>value</strong> : Listeners are passed a single argument which is the message posted from the content script. The message can be any <a href="/en-US/Add-ons/SDK/Guides/Content_Scripts/using_port#JSON-Serializable_Values">JSON-serializable value</a>.</p>
-<h2 id="Menu">Menu</h2>
-<p>A labeled menu item that expands into a submenu.</p>
-<h3 id="Methods_2">Methods</h3>
-<h4 class="addon-sdk-api-name" id="addItem(item)"><code>addItem(item)</code></h4>
-<p>Appends a menu item to the end of the menu. If the item is already contained in another menu or in the top-level context menu, it's automatically removed first. If the item is already contained in this menu it will just be moved to the end of the menu.</p>
-<h5 id="Parameters_4">Parameters</h5>
-<p><strong>item : Item,Menu,Separator</strong><br>
- The <code>Item</code>, <code>Menu</code>, or <code>Separator</code> to add to the menu.</p>
-<h4 class="addon-sdk-api-name" id="removeItem(item)"><code>removeItem(item)</code></h4>
-<p>Removes the given menu item from the menu. If the menu does not contain the item, this method does nothing.</p>
-<h5 id="Parameters_5">Parameters</h5>
-<p><strong>item : Item,Menu,Separator</strong><br>
- The menu item to remove from the menu.</p>
-<h4 class="addon-sdk-api-name" id="destroy()_2"><code>destroy()</code></h4>
-<p>Permanently removes the menu from its parent menu and frees its resources. The menu must not be used afterward. If you need to remove the menu from its parent menu but use it afterward, call <code>removeItem()</code> on the parent menu instead.</p>
-<h3 id="Properties_2">Properties</h3>
-<h4 class="addon-sdk-api-name" id="label_2"><code>label</code></h4>
-<p>The menu's label. You can set this after creating the menu to update its label later.</p>
-<h4 class="addon-sdk-api-name" id="items"><code>items</code></h4>
-<p>An array containing the items in the menu. The array is read-only, meaning that modifications to it will not affect the menu. However, setting this property to a new array will replace all the items currently in the menu with the items in the new array.</p>
-<h4 class="addon-sdk-api-name" id="image_2"><code>image</code></h4>
-<p>The menu's icon, a string URL. The URL can be remote, a reference to an image in the add-on's <code>data</code> directory, or a data URI. You can set this after creating the menu to update its image later. To remove the menu's image, set it to <code>null</code>.</p>
-<h4 class="addon-sdk-api-name" id="context_2"><code>context</code></h4>
-<p>A list of declarative contexts for which the menu will appear in the context menu. Contexts can be added by calling <code>context.add()</code> and removed by called <code>context.remove()</code>.</p>
-<h4 class="addon-sdk-api-name" id="parentMenu_2"><code>parentMenu</code></h4>
-<p>The menu's parent <code>Menu</code>, or <code>null</code> if the menu is contained in the top-level context menu. This property is read-only. To add the menu to a new menu, call that menu's <code>addItem()</code> method.</p>
-<h4 class="addon-sdk-api-name" id="contentScript_2"><code>contentScript</code></h4>
-<p>The content script or the array of content scripts associated with the menu during creation.</p>
-<h4 class="addon-sdk-api-name" id="contentScriptFile_2"><code>contentScriptFile</code></h4>
-<p>The URL of a content script or the array of such URLs associated with the menu during creation.</p>
-<h3 id="Events_2">Events</h3>
-<h4 class="addon-sdk-api-name" id="message_2"><code>message</code></h4>
-<p>If you listen to this event you can receive message events from content scripts associated with this menu item. When a content script posts a message using <code>self.postMessage()</code>, the message is delivered to the add-on code in the menu item's <code>message</code> event.</p>
-<h5 id="Arguments_2">Arguments</h5>
-<p><strong>value</strong> : Listeners are passed a single argument which is the message posted from the content script. The message can be any <a href="/en-US/Add-ons/SDK/Guides/Content_Scripts/using_port#JSON-Serializable_Values">JSON-serializable value</a>.</p>
-<h2 id="Separator">Separator</h2>
-<p>A menu separator. Separators can be contained only in <code>Menu</code>s, not in the top-level context menu.</p>
-<h3 id="Methods_3">Methods</h3>
-<h4 class="addon-sdk-api-name" id="destroy()_3"><code>destroy()</code></h4>
-<p>Permanently removes the separator from its parent menu and frees its resources. The separator must not be used afterward. If you need to remove the separator from its parent menu but use it afterward, call <code>removeItem()</code> on the parent menu instead.</p>
-<h3 id="Properties_3">Properties</h3>
-<h4 class="addon-sdk-api-name" id="parentMenu_3"><code>parentMenu</code></h4>
-<p>The separator's parent <code>Menu</code>. This property is read-only. To add the separator to a new menu, call that menu's <code>addItem()</code> method.</p>
diff --git a/files/zh-tw/mozilla/add-ons/sdk/high-level_apis/index.html b/files/zh-tw/mozilla/add-ons/sdk/high-level_apis/index.html
deleted file mode 100644
index 32b39d045b..0000000000
--- a/files/zh-tw/mozilla/add-ons/sdk/high-level_apis/index.html
+++ /dev/null
@@ -1,10 +0,0 @@
----
-title: High-Level APIs
-slug: Mozilla/Add-ons/SDK/High-Level_APIs
-tags:
- - NeedsTranslation
- - TopicStub
-translation_of: Archive/Add-ons/Add-on_SDK/High-Level_APIs
----
-<p>Modules listed on this page implement high-level APIs for building add-ons: creating user interfaces, interacting with the web, and interacting with the browser.</p>
-<p>Unless the documentation explicitly says otherwise, all these modules are "Stable": we'll avoid making incompatible changes to them. {{ LandingPageListSubpages ("/en-US/Add-ons/SDK/High-Level_APIs", 5) }}</p>
diff --git a/files/zh-tw/mozilla/add-ons/sdk/index.html b/files/zh-tw/mozilla/add-ons/sdk/index.html
deleted file mode 100644
index 2937b883d7..0000000000
--- a/files/zh-tw/mozilla/add-ons/sdk/index.html
+++ /dev/null
@@ -1,82 +0,0 @@
----
-title: Add-on SDK
-slug: Mozilla/Add-ons/SDK
-tags:
- - NeedsTranslation
- - TopicStub
-translation_of: Archive/Add-ons/Add-on_SDK
----
-<p>有了附加元件開發套件(Add-on SDK),您可以使用標準的JavaScript、HTML、CSS等語法來建立Firefox的附加元件。SDK包含用來製作附加元件的JavaScript API,及建立、測試、運行或包裝附加元件的相關工具。</p>
-
-<hr>
-<h3 id="入門">入門</h3>
-
-<div class="column-container">
-<div class="column-half">
-<dl>
- <dt><a href="/en-US/Add-ons/SDK/Tutorials#getting-started">從此開始</a></dt>
- <dd>如何<a href="/en-US/Add-ons/SDK/Tutorials/Installation">安裝 SDK </a>及<a href="/en-US/Add-ons/SDK/Tutorials/Getting_Started_With_cfx">使用 cfx tool </a>來建立、測試或包裝附加元件。</dd>
- <dt><a href="/en-US/Add-ons/SDK/Tutorials#interact-with-the-browser">和瀏覽器互動</a></dt>
- <dd><a href="/en-US/Add-ons/SDK/Tutorials/Open_a_Web_Page">開啟網頁</a>、<a href="/en-US/Add-ons/SDK/Tutorials/Listen_For_Page_Load">監測頁面載入</a>以及<a href="/en-US/Add-ons/SDK/Tutorials/List_Open_Tabs">列出已開啟頁面</a>。</dd>
- <dt><a href="/en-US/Add-ons/SDK/Tutorials#development-techniques">開發技巧</a></dt>
- <dd>學習常用開發技術,如<a href="/en-US/Add-ons/SDK/Tutorials/Unit_testing">單元測試</a>、<a href="/en-US/Add-ons/SDK/Tutorials/Logging">紀錄</a>、<a href="/en-US/Add-ons/SDK/Tutorials/Creating_Reusable_Modules">建立可重用模組</a>、<a href="/en-US/Add-ons/SDK/Tutorials/l10n">在地化</a>、<a href="/en-US/Add-ons/SDK/Tutorials/Mobile_development">流動裝置</a> 。</dd>
-</dl>
-</div>
-
-<div class="column-half">
-<dl>
- <dt><a href="/en-US/Add-ons/SDK/Tutorials#create-user-interfaces">建立使用者介面的元件</a></dt>
- <dd>如<a href="/en-US/Add-ons/SDK/Tutorials/Adding_a_Button_to_the_Toolbar">工具列按鈕</a>、<a href="/en-US/Add-ons/SDK/Tutorials/Add_a_Context_Menu_Item">內文選單</a>、<a href="/en-US/Add-ons/SDK/Tutorials/Add_a_Menu_Item_to_Firefox">選單項目</a>、<a href="/en-US/Add-ons/SDK/Tutorials/Display_a_Popup">對話框</a>等等。</dd>
- <dt><a href="/en-US/Add-ons/SDK/Tutorials#modify-web-pages">修改網頁</a></dt>
- <dd>修改<a href="/en-US/Add-ons/SDK/Tutorials/Modifying_Web_Pages_Based_on_URL">符合網址模式</a>的頁面或動態<a href="/en-US/Add-ons/SDK/Tutorials/Modifying_the_Page_Hosted_by_a_Tab">修改特定分頁</a>。</dd>
- <dt><a href="/en-US/Add-ons/SDK/Tutorials/Annotator">整合各項</a></dt>
- <dd>以 Annotator(一個顯示註解的附加元件)為例顯示製作流程。</dd>
-</dl>
-</div>
-</div>
-
-<hr>
-<h3 id="指引">指引</h3>
-
-<div class="column-container">
-<div class="column-half">
-<dl>
- <dt><a href="/en-US/Add-ons/SDK/Guides#contributors-guide">貢獻者指南</a></dt>
- <dd>學習<a href="/en-US/Add-ons/SDK/Guides/Getting_Started">如何貢獻 </a>SDK 以及 SDK 當中的重要術語,如<a href="/en-US/Add-ons/SDK/Guides/Modules">模組</a>、<a href="/en-US/Add-ons/SDK/Guides/Classes_and_Inheritance">類(Class)及繼承(Inheritance)</a>、<a href="/en-US/Add-ons/SDK/Guides/Private_Properties">私有屬性</a>以及<a href="/en-US/Add-ons/SDK/Guides/Content_Processes">內容處理</a>。</dd>
- <dt><a href="/en-US/Add-ons/SDK/Guides#sdk-infrastructure">SDK infrastructure</a></dt>
- <dd>Aspects of the SDK's underlying technology: <a href="/en-US/Add-ons/SDK/Guides/Module_structure_of_the_SDK">modules</a>, the <a href="/en-US/Add-ons/SDK/Guides/Program_ID">Program ID</a>, and the rules defining <a href="/en-US/Add-ons/SDK/Guides/Firefox_Compatibility">Firefox compatibility</a>.</dd>
- <dt><a href="/en-US/Add-ons/SDK/Guides/Content_Scripts">Content scripts</a></dt>
- <dd>A detailed guide to <a href="/en-US/Add-ons/SDK/Guides/Content_Scripts">working with content scripts</a>, including: <a href="/en-US/Add-ons/SDK/Guides/Loading_content_scripts">how to load content scripts</a>, <a href="/en-US/Add-ons/SDK/Guides/Accessing_the_DOM">which objects content scripts can access</a>, and <a href="/en-US/Add-ons/SDK/Guides/Communicating_with_other_scripts">how to communicate between content scripts and the rest of your add-on</a>.</dd>
-</dl>
-</div>
-
-<div class="column-half">
-<dl>
- <dt><a href="/en-US/Add-ons/SDK/Guides#sdk-idioms">SDK idioms</a></dt>
- <dd>The SDK's <a href="/en-US/Add-ons/SDK/Guides/Working_with_Events">event framework</a> and the <a href="/en-US/Add-ons/SDK/Guides/Two_Types_of_Scripts">distinction between add-on scripts and content scripts</a>.</dd>
- <dt><a href="/en-US/Add-ons/SDK/Guides/XUL_Migration_Guide">XUL migration</a></dt>
- <dd>A guide to <a href="/en-US/Add-ons/SDK/Guides/XUL_Migration_Guide">porting XUL add-ons to the SDK</a>. This guide includes a <a href="/en-US/Add-ons/SDK/Guides/XUL_vs_SDK">comparison of the two toolsets</a> and a <a href="/en-US/Add-ons/SDK/Guides/Porting_the_Library_Detector">working example</a> of porting a XUL add-on.</dd>
-</dl>
-</div>
-</div>
-
-<hr>
-<h3 id="參考資料">參考資料</h3>
-
-<div class="column-container">
-<div class="column-half">
-<dl>
- <dt><a href="/en-US/Add-ons/SDK/High-Level_APIs">高階 API</a></dt>
- <dd>高階 SDK API 的參考文件。</dd>
- <dt><a href="/en-US/Add-ons/SDK/Tools">工具參考</a></dt>
- <dd>Reference documentation for the <a href="/en-US/Add-ons/SDK/Tools/cfx">cfx tool</a> used to develop, test, and package add-ons, the <a href="/en-US/Add-ons/SDK/Tools/console">console</a> global used for logging, and the <a href="/en-US/Add-ons/SDK/Tools/package_json">package.json</a> file.</dd>
-</dl>
-</div>
-
-<div class="column-half">
-<dl>
- <dt><a href="/en-US/Add-ons/SDK/Low-Level_APIs">低階 API</a></dt>
- <dd>低階 SDK API 的參考文件。</dd>
-</dl>
-</div>
-</div>
diff --git a/files/zh-tw/mozilla/add-ons/sdk/low-level_apis/index.html b/files/zh-tw/mozilla/add-ons/sdk/low-level_apis/index.html
deleted file mode 100644
index 2108d30783..0000000000
--- a/files/zh-tw/mozilla/add-ons/sdk/low-level_apis/index.html
+++ /dev/null
@@ -1,20 +0,0 @@
----
-title: Low-Level APIs
-slug: Mozilla/Add-ons/SDK/Low-Level_APIs
-translation_of: Archive/Add-ons/Add-on_SDK/Low-Level_APIs
----
-<p>Modules in this section implement low-level APIs. These modules fall roughly into three categories:</p>
-<ul>
- <li>
- <p>fundamental utilities such as <a href="/en-US/Add-ons/SDK/Low-Level_APIs/util_collection">collection</a>. Many add-ons are likely to want to use modules from this category.</p>
- </li>
- <li>
- <p>building blocks for higher level modules, such as <a href="/en-US/Add-ons/SDK/Low-Level_APIs/event_core">events</a> and <a href="/en-US/Add-ons/SDK/Low-Level_APIs/content_worker">worker</a>. You're more likely to use these if you are building your own modules that implement new APIs, thus extending the SDK itself.</p>
- </li>
- <li>
- <p>privileged modules that expose powerful low-level capabilities such as <a href="/en-US/Add-ons/SDK/Low-Level_APIs/window_utils">window/utils</a> and <a href="/en-US/Add-ons/SDK/Low-Level_APIs/net_xhr">net/xhr</a>. You can use these modules in your add-on if you need to, but should be aware that the cost of privileged access is the need to take more elaborate security precautions. In many cases these modules have simpler, more restricted analogs among the "High-Level APIs" (for example, <a href="/en-US/Add-ons/SDK/High-Level_APIs/windows">windows</a> or <a href="/en-US/Add-ons/SDK/High-Level_APIs/request">request</a>).</p>
- </li>
-</ul>
-<p>These modules are still in active development, and we expect to make incompatible changes to them in future releases.</p>
-<p>{{ LandingPageListSubpages ("/en-US/Add-ons/SDK/Low-Level_APIs", 5) }}</p>
-<p> </p>
diff --git a/files/zh-tw/mozilla/add-ons/themes/obsolete/index.html b/files/zh-tw/mozilla/add-ons/themes/obsolete/index.html
deleted file mode 100644
index d420b6ebf0..0000000000
--- a/files/zh-tw/mozilla/add-ons/themes/obsolete/index.html
+++ /dev/null
@@ -1,10 +0,0 @@
----
-title: Obsolete
-slug: Mozilla/Add-ons/Themes/Obsolete
-tags:
- - NeedsTranslation
- - TopicStub
-translation_of: Mozilla/Add-ons/Themes/Obsolete
----
-<p>This page collects theme docs that we don't expect will ever be updated, but which we're keeping for the time being as potential source material for updated docs.</p>
-<p>{{ ListSubPages ("/en-US/Add-ons/Themes/Obsolete", 5) }}</p>