aboutsummaryrefslogtreecommitdiff
path: root/files/zh-tw/webapi
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 21:46:22 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 21:46:22 -0500
commita065e04d529da1d847b5062a12c46d916408bf32 (patch)
treefe0f8bcec1ff39a3c499a2708222dcf15224ff70 /files/zh-tw/webapi
parent218934fa2ed1c702a6d3923d2aa2cc6b43c48684 (diff)
downloadtranslated-content-a065e04d529da1d847b5062a12c46d916408bf32.tar.gz
translated-content-a065e04d529da1d847b5062a12c46d916408bf32.tar.bz2
translated-content-a065e04d529da1d847b5062a12c46d916408bf32.zip
update based on https://github.com/mdn/yari/issues/2028
Diffstat (limited to 'files/zh-tw/webapi')
-rw-r--r--files/zh-tw/webapi/alarm/index.html196
-rw-r--r--files/zh-tw/webapi/camera/index.html20
-rw-r--r--files/zh-tw/webapi/contacts/index.html197
-rw-r--r--files/zh-tw/webapi/device_storage/index.html228
-rw-r--r--files/zh-tw/webapi/idle/index.html61
-rw-r--r--files/zh-tw/webapi/network_stats/index.html86
-rw-r--r--files/zh-tw/webapi/power_management/index.html102
-rw-r--r--files/zh-tw/webapi/settings/index.html69
-rw-r--r--files/zh-tw/webapi/simple_push/index.html115
-rw-r--r--files/zh-tw/webapi/tcp_socket/index.html69
-rw-r--r--files/zh-tw/webapi/time_and_clock/index.html30
-rw-r--r--files/zh-tw/webapi/web_activities/index.html415
-rw-r--r--files/zh-tw/webapi/webfm_api/index.html130
-rw-r--r--files/zh-tw/webapi/websms/index.html130
14 files changed, 0 insertions, 1848 deletions
diff --git a/files/zh-tw/webapi/alarm/index.html b/files/zh-tw/webapi/alarm/index.html
deleted file mode 100644
index fc1eddb8d3..0000000000
--- a/files/zh-tw/webapi/alarm/index.html
+++ /dev/null
@@ -1,196 +0,0 @@
----
-title: Alarm API
-slug: WebAPI/Alarm
-translation_of: Archive/B2G_OS/API/Alarm_API
----
-<p>{{ SeeCompatTable() }}</p>
-<h2 id="摘要">摘要</h2>
-<p>Alarm API 可存取裝置的警示設定功能。而警示設定功能可排定通知的時間,或在特定時間啟動某個 App。如鬧鐘、行事曆、自動更新等的 Apps,就可能需要透過 Alarm API,在特定時點觸發裝置的特定動作。</p>
-<p>而 Alarm API 本身僅可進行警示排程。透過 System Message API 即可將警示發送到 Apps,因此若 Apps 要對警示做出反應,就必須先將 Apps 註冊至 <code>alarm</code> 訊息。</p>
-<p>另外,使用 <a href="https://developer.mozilla.org/en-US/docs/Web/API/MozAlarmsManager" title="/en-US/docs/Web/API/MozAlarmsManager"><code>MozAlarmsManager</code></a> 介面的 <a href="https://developer.mozilla.org/en-US/docs/Web/API/window.navigator.mozAlarms" title="/en-US/docs/Web/API/window.navigator.mozAlarms"><code>window.navigator.mozAlarms</code></a> 物件,即可設定警示。</p>
-<h2 id="example" name="example">警示排程</h2>
-<p>使用警示功能的第一件事,就是警示排程。若依照時區來分,共可分成 2 種警示,且均可透過 <a href="https://developer.mozilla.org/en-US/docs/Web/API/MozAlarmsManager.add" title="/en-US/docs/Web/API/MozAlarmsManager.add"><code>MozAlarmsManager.add</code></a> 函式進行排程。</p>
-<div class="note">
- <p><strong>注意:</strong>若未針對特定 Apps 來設定警示,則只要是正在監聽警示的 Apps,均將接到系統所發送的警示。</p>
-</div>
-<h3 id="忽略時區的警示">忽略時區的警示</h3>
-<p>系統將根據裝置的本端時間,發送此類警示。若裝置變更了時區設定,則系統將根據新的時區而發送警示。舉例來說,如果使用者位在巴黎,設定了 12 PM CET (<em>Central European Time</em>) 發出警示,結果出差到舊金山時,那同樣會在 12 PM PDT (<em>Pacific Daylight Time</em>) 發送警示。</p>
-<pre class="brush: js">// This the date to schedule the alarm
-var myDate = new Date("May 15, 2012 16:20:00");
-
-// This is arbitrary data pass to the alarm
-var data = {
- foo: "bar"
-}
-
-// The "ignoreTimezone" string is what make the alarm ignoring it
-var request = navigator.mozAlarms.add(myDate, "ignoreTimezone", data);
-
-request.onsuccess = function () {
- console.log("The alarm has been scheduled");
-};
-
-request.onerror = function () {
- console.log("An error occurred: " + this.error.name);
-};
-</pre>
-<h3 id="遵守時區的警示">遵守時區的警示</h3>
-<p>系統將根據排程當下的時區,發送此類警示。若裝置因為某個理由變更了時區,系統同樣是根據原始的排程時區而發出警示。舉例來說,如果使用者位在巴黎,設定於 12 PM CET (<em>Central European Time</em>) 發送警示,結果出差到舊金山時,系統將於 3 AM PDT (<em>Pacific Daylight Time</em>) 發送警示。</p>
-<pre class="brush: js">// This the date to schedule the alarm
-var myDate = new Date("May 15, 2012 16:20:00");
-
-// This is arbitrary data pass to the alarm
-var data = {
- foo: "bar"
-}
-
-// The "honorTimezone" string is what make the alarm honoring it
-var request = navigator.mozAlarms.add(myDate, "honorTimezone", data);
-
-request.onsuccess = function () {
- console.log("The alarm has been scheduled");
-};
-
-request.onerror = function () {
- console.log("An error occurred: " + this.error.name);
-};
-</pre>
-<h2 id="管理警示">管理警示</h2>
-<p>針對目前 App 已排定的警示,<a href="https://developer.mozilla.org/en-US/docs/Web/API/MozAlarmsManager.getAll" title="/en-US/docs/Web/API/MozAlarmsManager.getAll"><code>MozAlarmsManager.getAll</code></a> 函式將回傳完整的警示清單。這份清單則為<a href="https://developer.mozilla.org/en-US/docs/WebAPI/Alarm#mozAlarm"> mozAlarm</a> 物件的<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array" title="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array">陣列</a>。</p>
-<h3 id="mozAlarm">mozAlarm</h3>
-<p>這些物件均為非同步 JavaScript 物件,並包含下列屬性:</p>
-<dl>
- <dt>
- <code>id</code></dt>
- <dd>
- 1 組號碼代表警示的 ID</dd>
- <dt>
- <code>date</code></dt>
- <dd>
- <a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date" title="/en-US/docs/JavaScript/Reference/Global_Objects/Date">Date</a> 物件代表警示的排程時間</dd>
- <dt>
- <code>respectTimezone</code></dt>
- <dd>
- 1 組字串指出警示將遵守或忽略 <code>date</code> 物件的時區資訊。該值可為 <code>ignoreTimezone</code> 或 <code>honorTimezone </code></dd>
- <dt>
- <code>data</code></dt>
- <dd>
- 與警示一同儲存的所有資料,均納入此 JavaScript 物件中</dd>
-</dl>
-<pre class="brush: js">var request = navigator.mozAlarms.getAll();
-
-request.onsuccess = function () {
- this.result.forEach(function (alarm) {
- console.log('Id: ' + alarm.id);
- console.log('date: ' + alarm.date);
- console.log('respectTimezone: ' + alarm.respectTimezone);
- console.log('data: ' + JSON.stringify(alarm.data));
- });
-};
-
-request.onerror = function () {
- console.log("An error occurred: " + this.error.name);
-};
-</pre>
-<p><a href="https://developer.mozilla.org/en-US/docs/Web/API/MozAlarmsManager.remove" title="/en-US/docs/Web/API/MozAlarmsManager.remove"><code>MozAlarmsManager.remove</code></a> 函式則可解除已排程的警示。</p>
-<pre class="brush: js">var alarmId;
-
-// Set an alarm and store it's id
-var request = navigator.mozAlarms.add(new Date("May 15, 2012 16:20:00"), "honorTimezone");
-
-request.onsuccess = function () {
- alarmId = this.result;
-}
-
-// ...
-
-// Later on, removing the alarm if it exists
-if (alarmId) {
- navigator.mozAlarms.remove(alarmId);
-}
-</pre>
-<h2 id="處理警示">處理警示</h2>
-<p>在系統發送警示之後,任何 Apps 均可做出回應。為了要能處理警示,Apps 必須將本身註冊為警示處理器 (Alarm handler)。透過 System Messaging API 的 2 個步驟即可完成註冊:</p>
-<p>首先,Apps 必須將 <code>alarm</code> 納入<a href="https://developer.mozilla.org/en-US/docs/Apps/Manifest#messages" title="/en-US/docs/Apps/Manifest#messages">本身 manifest 檔案的 message 屬性</a>中,而此 manifest 檔案需包含「已註冊回呼 (Callback) 函式的文件」之網址。一旦發送警示時,就會呼叫該文件中所註冊的回呼函式。</p>
-<pre class="brush: js">"messages": [
- { "alarm": "/index.html" }
-]</pre>
-<p>其次,Apps 必須以 <code>alarm</code> 訊息綁定回呼函式;可透過 <a href="https://developer.mozilla.org/en-US/docs/Web/API/window.navigator.mozSetMessageHandler" title="/en-US/docs/Web/API/window.navigator.mozSetMessageHandler"><code>navigator.mozSetMessageHandler</code></a> 函式完成此步驟。此回呼函式將接收 <a href="https://developer.mozilla.org/en-US/docs/WebAPI/Alarm#mozAlarm">mozAlarm</a> 物件,其內為警示所附掛的資料。</p>
-<pre class="brush: js">navigator.mozSetMessageHandler("alarm", function (mozAlarm) {
- alert("alarm fired: " + JSON.stringify(mozAlarm.data));
-});
-</pre>
-<p>如果 App 想確認是否有警示延宕在系統端尚未發出,則可使用<a href="https://developer.mozilla.org/en-US/docs/Web/API/window.navigator.mozHasPendingMessage" title="/en-US/docs/Web/API/window.navigator.mozHasPendingMessage"><code>navigator.mozHasPendingMessage</code></a> 函式並搭配 <code>alarm</code> 值。</p>
-<pre class="brush: js">navigator.mozHasPendingMessage("alarm");
-</pre>
-<h2 id="規格">規格</h2>
-<table class="standard-table">
- <thead>
- <tr>
- <th scope="col">Specification</th>
- <th scope="col">Status</th>
- <th scope="col">Comment</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>{{SpecName('Alarm API')}}</td>
- <td>{{Spec2('Alarm API')}}</td>
- <td>Initial specification.</td>
- </tr>
- </tbody>
-</table>
-<h2 id="瀏覽器相容性">瀏覽器相容性</h2>
-<p>{{ CompatibilityTable() }}</p>
-<div id="compat-desktop">
- <table class="compat-table">
- <tbody>
- <tr>
- <th>Feature</th>
- <th>Chrome</th>
- <th>Firefox (Gecko)</th>
- <th>Internet Explorer</th>
- <th>Opera</th>
- <th>Safari</th>
- </tr>
- <tr>
- <td>Basic support</td>
- <td>{{ CompatUnknown()}}</td>
- <td>{{CompatGeckoDesktop("16")}} {{ property_prefix("moz") }}</td>
- <td>{{ CompatNo() }}</td>
- <td>{{ CompatNo() }}</td>
- <td>{{ CompatNo() }}</td>
- </tr>
- </tbody>
- </table>
-</div>
-<div id="compat-mobile">
- <table class="compat-table">
- <tbody>
- <tr>
- <th>Feature</th>
- <th>Android</th>
- <th>Chrome for Android</th>
- <th>Firefox Mobile (Gecko)</th>
- <th>IE Mobile</th>
- <th>Opera Mobile</th>
- <th>Safari Mobile</th>
- </tr>
- <tr>
- <td>Basic support</td>
- <td>{{ CompatUnknown() }}</td>
- <td>{{ CompatNo() }}</td>
- <td>{{CompatGeckoMobile("10")}} {{ property_prefix("moz") }}</td>
- <td>{{ CompatNo() }}</td>
- <td>{{ CompatNo() }}</td>
- <td>{{ CompatNo() }}</td>
- </tr>
- </tbody>
- </table>
-</div>
-<h2 id="另可參閱">另可參閱</h2>
-<ul>
- <li>{{domxref("window.navigator.mozAlarms","navigator.mozAlarms")}}</li>
- <li>{{domxref("MozAlarmsManager")}}</li>
- <li>{{domxref("window.navigator.mozSetMessageHandler")}}</li>
-</ul>
diff --git a/files/zh-tw/webapi/camera/index.html b/files/zh-tw/webapi/camera/index.html
deleted file mode 100644
index f6f1df5e2c..0000000000
--- a/files/zh-tw/webapi/camera/index.html
+++ /dev/null
@@ -1,20 +0,0 @@
----
-title: Camera API
-slug: WebAPI/Camera
-translation_of: Archive/B2G_OS/API/Camera_API
----
-<p>{{ ApiRef() }}</p>
-<p>{{ non-standard_header() }}</p>
-<p>{{ B2GOnlyHeader2('certified') }}</p>
-<p><strong>Camera API</strong> 可讓 Apps 管理裝置上的相機,進一步拍照、錄製影片,並取得如焦距、縮放、白平衡、閃光燈等的資訊。Camera API 屬於 Priviledged API,並僅限 Certified Apps 使用。</p>
-<div class="note">
- <p><strong>注意:</strong>除非你打算建構新 App 以取代預設的「<em>Camera</em>」App,否則應不會使用此 API。如果你只是要使用裝置上的相機功能,則應使用 <a href="https://developer.mozilla.org/en-US/docs/WebAPI/Web_Activities" title="/en-US/docs/Web/API/Web_Activities">Web Activities API</a>。</p>
-</div>
-<h2 id="另可參閱">另可參閱</h2>
-<ul>
- <li>{{domxref("window.navigator.mozCameras", "navigator.mozCameras")}}</li>
- <li>{{domxref("CameraManager")}}</li>
- <li>{{domxref("CameraControl")}}</li>
- <li>{{domxref("CameraCapabilities")}}</li>
-</ul>
-<p> </p>
diff --git a/files/zh-tw/webapi/contacts/index.html b/files/zh-tw/webapi/contacts/index.html
deleted file mode 100644
index 6775c57248..0000000000
--- a/files/zh-tw/webapi/contacts/index.html
+++ /dev/null
@@ -1,197 +0,0 @@
----
-title: Contacts API
-slug: WebAPI/Contacts
-translation_of: Archive/B2G_OS/API/Contacts_API
----
-<p>{{ SeeCompatTable }}</p>
-<p>{{ B2GOnlyHeader2('privileged') }}</p>
-<h2 id="摘要">摘要</h2>
-<p>Contacts API 提供簡易的管理介面,可用於系統通訊錄所儲存的聯絡人資訊。Contacts API 的常見使用範例,就是針對通訊錄而建構出管理 Apps。</p>
-<div class="note">
- <p><strong>注意:</strong>由於聯絡人資訊屬於高敏感性的個人資料,因此僅限 Privileged 與 Certified Apps 可直接存取該 API。其他 Apps 均建議透過 <a href="https://developer.mozilla.org/en-US/docs/WebAPI/Web_Activities" title="/en-US/docs/WebAPI/Web_Activities">Web Activities</a> 而委派相關作業。</p>
-</div>
-<h2 id="管理聯絡人資訊">管理聯絡人資訊</h2>
-<p>透過 <a href="https://developer.mozilla.org/en-US/docs/Web/API/ContactManager" title="/en-US/docs/Web/API/ContactManager">ContactManager</a> 介面的 <a href="https://developer.mozilla.org/en-US/docs/Web/API/window.navigator.mozContacts" title="/en-US/docs/Web/API/window.navigator.mozContacts">navigator.mozContacts</a> 屬性,即可存取儲存於系統通訊錄中的資訊。</p>
-<h3 id="新增聯絡人">新增聯絡人</h3>
-<p>若要在系統通訊錄中建立新的項目,可分為 2 個步驟:</p>
-<ol>
- <li>建立新的 <a href="https://developer.mozilla.org/en-US/docs/Web/API/mozContact" title="The MozContact interface is used to describe a single contact in the device's contact database.">mozContact</a> 物件,並列出其必要屬性的欄位。<a href="https://developer.mozilla.org/en-US/docs/Web/API/mozContact" title="The MozContact interface is used to describe a single contact in the device's contact database.">mozContact</a> 介面將定義既有聯絡人的所有可能屬性。這些屬性絕大部分均與 vCard 4.0 規格所定義的相同。以下列出例外:
- <ul>
- <li>vCard N 分為 5 項屬性:<a href="https://developer.mozilla.org/en-US/docs/Web/API/ContactProperties.familyName" title="/en-US/docs/Web/API/ContactProperties.familyName"><code>familyName</code></a>、<a href="https://developer.mozilla.org/en-US/docs/Web/API/ContactProperties.givenName" title="/en-US/docs/Web/API/ContactProperties.givenName"><code>givenName</code></a>、<a href="https://developer.mozilla.org/en-US/docs/Web/API/ContactProperties.additionalName" title="/en-US/docs/Web/API/ContactProperties.additionalName"><code>additionalName</code></a>、<a href="https://developer.mozilla.org/en-US/docs/Web/API/ContactProperties.honorificPrefix" title="/en-US/docs/Web/API/ContactProperties.honorificPrefix"><code>honorificPrefix</code></a>、<a href="https://developer.mozilla.org/en-US/docs/Web/API/ContactProperties.honorificSuffix" title="/en-US/docs/Web/API/ContactProperties.honorificSuffix"><code>honorificSuffix</code></a></li>
- <li>vCard FN 屬性已重新命名為 <a href="https://developer.mozilla.org/en-US/docs/Web/API/ContactProperties.name" title="/en-US/docs/Web/API/ContactProperties.name"><code>name</code></a></li>
- <li>vCard GENDER 分為 2 項屬性:<a href="https://developer.mozilla.org/en-US/docs/Web/API/ContactProperties.sex" title="/en-US/docs/Web/API/ContactProperties.sex"><code>sex</code></a>、<a href="https://developer.mozilla.org/en-US/docs/Web/API/ContactProperties.genderIdentity" title="/en-US/docs/Web/API/ContactProperties.genderIdentity"><code>genderIdentity</code></a></li>
- </ul>
- </li>
- <li>以 <a href="https://developer.mozilla.org/en-US/docs/Web/API/ContactManager.save" title="/en-US/docs/Web/API/ContactManager.save">ContactManager.save()</a> 函式搭配聯絡人物件,並作為第一屬性。此函式將回傳 <a href="https://developer.mozilla.org/en-US/docs/Web/API/DOMRequest" title="/en-US/docs/Web/API/DOMRequest">DOMRequest</a> 以追蹤儲存作業是否成功或發生錯誤。</li>
-</ol>
-<pre class="brush: js">var person = new mozContact();
-person.givenName = ["John"];
-person.familyName = ["Doe"];
-person.nickName = ["No kidding"];
-
-var saving = navigator.mozContacts.save(person);
-
-saving.onsuccess = function() {
- console.log('new contact saved');
- // This update the person as it is stored
- // It includes its internal unique ID
- // Note that saving.result is null here
-};
-
-saving.onerror = function(err) {
- console.error(err);
-};
-</pre>
-<h3 id="尋找聯絡人">尋找聯絡人</h3>
-<p>有 2 個函式可檢索系統通訊錄中的聯絡人:</p>
-<ul>
- <li><a href="https://developer.mozilla.org/en-US/docs/Web/API/ContactManager.find" title="/en-US/docs/Web/API/ContactManager.find">ContactManager.find()</a> 可檢索特定的聯絡人清單。</li>
- <li><a href="https://developer.mozilla.org/en-US/docs/Web/API/ContactManager.getAll" title="/en-US/docs/Web/API/ContactManager.getAll">ContactManager.getAll()</a> 可檢索全部聯絡人。</li>
-</ul>
-<p>這 2 組函式都是讓參數 (本身即為物件) 能定義出篩選與排序的選項。<a href="https://developer.mozilla.org/en-US/docs/Web/API/ContactManager.getAll" title="The getAll method is used to access a sorted list of contact from the device's contact database. This method is best suited to access a large data set, where find() is better suited for a small data set.">ContactManager.getAll</a> 僅接受排序選項。這些選項為:</p>
-<ul>
- <li><code>sortBy</code><code>:</code>此字串將為排序過的搜尋結果。目前僅支援 givenName 與 familyName。</li>
- <li><code>sortOrder</code>::此字串將顯示結果的排序。可能為 <code>descending</code> (降冪) 或 <code>ascending</code> (升冪)。</li>
-</ul>
-<p>還有其他搜尋選項:</p>
-<ul>
- <li><code>filterBy</code><code>:</code>此字串陣列代表所要篩選的全部欄位。</li>
- <li><code>filterValue</code><code>:</code>符合的數值。</li>
- <li><code>filterOp</code><code>:</code>所要使用的篩選器比較運算子,可能為 <code>equals</code>、<code>startsWith</code>、<code>match</code>。則最後的 <code>match</code> 則特別用於電話號碼。</li>
- <li><code>filterLimit</code><code>:</code><a href="https://developer.mozilla.org/en-US/docs/Web/API/ContactManager.find" title="/en-US/docs/Web/API/ContactManager.find"><code>find</code></a> <code>函式所將檢索的聯絡人數量。</code></li>
-</ul>
-<p><a href="https://developer.mozilla.org/en-US/docs/Web/API/ContactManager.find" title="The find method is used to retrieve a limited list of contacts from the device's contact database. This method is best suited to access a small data set, where getAll() is better suited for a large data set.">find</a> 將回傳 <a href="https://developer.mozilla.org/en-US/docs/Web/API/DOMRequest" title="A DOMRequest object represents an ongoing operation. It provides callbacks that are called when the operation completes, as well as a reference to the operation's result. A DOM method that initiates an ongoing operation may return a DOMRequest object that">DOMRequest</a> 物件;<a href="https://developer.mozilla.org/en-US/docs/Web/API/ContactManager.getAll" title="The getAll method is used to access a sorted list of contact from the device's contact database. This method is best suited to access a large data set, where find() is better suited for a small data set.">getAll</a> 將回傳 <a href="https://developer.mozilla.org/en-US/docs/Web/API/DOMCursor" title="A DOMCursor object represents an ongoing operation over a list of results. It is an enhanced DOMRequest that allows to iterate through a list of results asynchronously. Each time its continue() method is called, the DOMCursor tries to reach the next resul">DOMCursor</a> 物件,以存取成功或錯誤的搜尋作業。</p>
-<p>若搜尋成功,則可於 <a href="https://developer.mozilla.org/en-US/docs/Web/API/DOMRequest.result" title="/en-US/docs/Web/API/DOMRequest.result">DOMRequest.result</a> 屬性中找到搜尋結果。可能是 <a href="https://developer.mozilla.org/en-US/docs/Web/API/ContactManager.find" title="The find method is used to retrieve a limited list of contacts from the device's contact database. This method is best suited to access a small data set, where getAll() is better suited for a large data set.">find</a> 的 <a href="https://developer.mozilla.org/en-US/docs/Web/API/mozContact" title="The MozContact interface is used to describe a single contact in the device's contact database.">mozContact</a> 物件陣列;也可能是 <a href="https://developer.mozilla.org/en-US/docs/Web/API/ContactManager.getAll" title="The getAll method is used to access a sorted list of contact from the device's contact database. This method is best suited to access a large data set, where find() is better suited for a small data set.">getAll</a> 的單一 <a href="https://developer.mozilla.org/en-US/docs/Web/API/mozContact" title="The MozContact interface is used to describe a single contact in the device's contact database.">mozContact</a> 物件。若要以 <a href="https://developer.mozilla.org/en-US/docs/Web/API/ContactManager.getAll" title="The getAll method is used to access a sorted list of contact from the device's contact database. This method is best suited to access a large data set, where find() is better suited for a small data set.">getAll</a> 接收清單中的其他結果,則可呼叫指示器的 <code>continue()</code> 函式。</p>
-<pre class="brush: js">var options = {
- filterValue : "John",
- filterBy : ["givenName","name","nickName"],
- filterOp : "contains",
- filterLimit : 1,
- sortBy : "familyName"
- sortOrder : "ascending"
-}
-
-var search = navigator.mozContacts.find(options);
-
-search.onsuccess = function() {
- if (search.result.length === 1) {
- var person = search.result[0];
- console.log("Found:" + person.givenName[0] + " " + person.familyName[0]);
- } else {
- console.log("Sorry, there is no such contact.")
- }
-}
-
-search.onerror = function() {
- console.warn("Uh! Something goes wrong, no result found!");
-}
-
-var allContacts = navigator.mozContacts.getAll({sortBy: "familyName", sortOrder: "descending"});
-
-allContacts.onsuccess = function(event) {
- var cursor = event.target;
- if (cursor.result) {
- console.log("Found: " + cursor.result.givenName[0] + " " + cursor.result.familyName[0]);
- cursor.continue();
- } else {
- console.log("No more contacts");
- }
-}
-
-allContacts.onerror = function() {
- console.warn("Something went terribly wrong! :(");
-}
-
-</pre>
-<h3 id="更新聯絡人">更新聯絡人</h3>
-<p>在透過 <a href="https://developer.mozilla.org/en-US/docs/Web/API/ContactManager.find" title="/en-US/docs/Web/API/ContactManager.find"><code>find()</code></a> 或 <a href="https://developer.mozilla.org/en-US/docs/Web/API/ContactManager.getAll" title="/en-US/docs/Web/API/ContactManager.getAll"><code>getAll()</code></a> 檢索聯絡人時,又或針對新聯絡人而成功呼叫 <a href="https://developer.mozilla.org/en-US/docs/Web/API/ContactManager.save" title="/en-US/docs/Web/API/ContactManager.save"><code>save()</code></a> 時,此聯絡人必須附加某些後設資料 (Meta-data):</p>
-<ul>
- <li>透過 <a href="https://developer.mozilla.org/en-US/docs/Web/API/mozContact.id" title="The id property is a unique string representing the contact within the device's contact database.">mozContact.id</a> 取得專屬 ID</li>
- <li><a href="https://developer.mozilla.org/en-US/docs/Web/API/mozContact.updated" title="The updated property provides the date of when the contact was updated for the last time on the device's contact database.">mozContact.updated</a> 中的 <a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date" title="/en-US/docs/JavaScript/Reference/Global_Objects/Date">Date</a> 物件,將代表聯絡人最後的更新時間</li>
-</ul>
-<p>若更新某位聯絡人,其實只是更改其屬性值,再呼叫 <a href="https://developer.mozilla.org/en-US/docs/Web/API/ContactManager.save" title="/en-US/docs/Web/API/ContactManager.save">save()</a> 函式即可儲存。</p>
-<div class="note">
- <p><strong>注意:</strong>每次只要新增、更新、刪除聯絡人,就會觸發 <a href="https://developer.mozilla.org/en-US/docs/Web/Reference/Events/contactchange" title="/en-US/docs/Web/Reference/Events/contactchange">contactchange</a> 事件,以追蹤系統通訊錄的所有變更。另可透過 <a href="https://developer.mozilla.org/en-US/docs/Web/API/ContactManager.oncontactchange" title="/en-US/docs/Web/API/ContactManager.oncontactchange">ContactManager.oncontactchange</a> 屬性而處理該事件。</p>
-</div>
-<h3 id="刪除聯絡人">刪除聯絡人</h3>
-<p>呼叫 <a href="https://developer.mozilla.org/en-US/docs/Web/API/ContactManager.remove" title="/en-US/docs/Web/API/ContactManager.remove"><code>ContactManager.remove()</code></a> 函式,只會刪除已傳入的 <a href="https://developer.mozilla.org/en-US/docs/Web/API/mozContact" title="The MozContact interface is used to describe a single contact in the device's contact database.">mozContact</a> 物件。</p>
-<p>在某些極端情況下,也可透過 <a href="https://developer.mozilla.org/en-US/docs/Web/API/ContactManager.clear" title="/en-US/docs/Web/API/ContactManager.clear"><code>ContactManager.clear()</code></a> 而刪除所有的聯絡人。因為一旦完成就沒辦法恢復資料,所以呼叫此函式時請特別謹慎。</p>
-<h2 id="Specifications" name="Specifications">規格</h2>
-<table class="standard-table">
- <thead>
- <tr>
- <th scope="col">Specification</th>
- <th scope="col">Status</th>
- <th scope="col">Comment</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>{{ SpecName('Contacts', '', 'Contacts Manager API') }}</td>
- <td>{{ Spec2('Contacts') }}</td>
- <td>First Working Draft (未穩定)</td>
- </tr>
- <tr>
- <td><a href="http://tools.ietf.org/html/rfc6350" title="http://tools.ietf.org/html/rfc6350">vCard Format Specification</a></td>
- <td>RFC</td>
- <td><code>RFC6350</code></td>
- </tr>
- </tbody>
-</table>
-<h2 id="瀏覽器相容性">瀏覽器相容性</h2>
-<p>{{ CompatibilityTable() }}</p>
-<div id="compat-desktop">
- <table class="compat-table">
- <tbody>
- <tr>
- <th>Feature</th>
- <th>Chrome</th>
- <th>Firefox (Gecko)</th>
- <th>Internet Explorer</th>
- <th>Opera</th>
- <th>Safari</th>
- </tr>
- <tr>
- <td>基本支援</td>
- <td>{{CompatNo()}}</td>
- <td>{{CompatNo()}}</td>
- <td>{{CompatNo()}}</td>
- <td>{{CompatNo()}}</td>
- <td>{{CompatNo()}}</td>
- </tr>
- </tbody>
- </table>
-</div>
-<div id="compat-mobile">
- <table class="compat-table">
- <tbody>
- <tr>
- <th>Feature</th>
- <th>Android</th>
- <th>Chrome for Android</th>
- <th>Firefox Mobile (Gecko)</th>
- <th>IE Mobile</th>
- <th>Opera Mobile</th>
- <th>Safari Mobile</th>
- </tr>
- <tr>
- <td>基本支援</td>
- <td>{{CompatNo()}}</td>
- <td>{{CompatNo()}}</td>
- <td>{{CompatVersionUnknown()}}</td>
- <td>{{CompatNo()}}</td>
- <td>{{CompatNo()}}</td>
- <td>{{CompatNo()}}</td>
- </tr>
- </tbody>
- </table>
-</div>
-<h3 id="Gecko_說明">Gecko 說明</h3>
-<p>此規格尚未確定,因此目前 Gecko 仍屬非標準建構。</p>
-<h2 id="另可參閱">另可參閱</h2>
-<ul>
- <li><a href="https://developer.mozilla.org/en-US/docs/Web/API/window.navigator.mozContacts" title="Return a ContactManager to access and manage all the contacts available on the device.">navigator.mozContacts</a></li>
- <li><a href="https://developer.mozilla.org/en-US/docs/Web/API/mozContact" title="The MozContact interface is used to describe a single contact in the device's contact database.">mozContact</a></li>
- <li><a href="https://developer.mozilla.org/en-US/docs/Web/API/ContactManager" title="The ContactManager interface is used to access and manage the contact available on the device.">ContactManager</a></li>
- <li><a href="https://developer.mozilla.org/en-US/docs/Web/API/MozContactChangeEvent" title="The MozContactChangeEvent interface provides information about the contact that has changed. It inherits from the Event interface.">MozContactChangeEvent</a></li>
-</ul>
diff --git a/files/zh-tw/webapi/device_storage/index.html b/files/zh-tw/webapi/device_storage/index.html
deleted file mode 100644
index d09fd49015..0000000000
--- a/files/zh-tw/webapi/device_storage/index.html
+++ /dev/null
@@ -1,228 +0,0 @@
----
-title: Device Storage API
-slug: WebAPI/Device_Storage
-translation_of: Archive/B2G_OS/API/Device_Storage_API
----
-<p>{{ non-standard_header() }}</p>
-<p>{{ B2GOnlyHeader2('privileged') }}</p>
-<h2 id="摘要">摘要</h2>
-<p>Device Storage API 可存取 Web Apps 中的檔案系統。存取檔案系統可能牽涉極高的安全敏感度,所以此 API 僅可用於 Privileged Apps。</p>
-<div class="note">
- <p><strong>注意:</strong>若裝置儲存媒體的存取速度極慢,可能是受限於實體層 (Physical level) 的關係。在許多情況下,若以 <a href="https://developer.mozilla.org/en-US/docs/IndexedDB" title="/en-US/docs/IndexedDB">IndexedDB</a> 資料庫儲存檔案,取代實體的裝置儲存媒體,將可達到更高的速度。</p>
-</div>
-<h2 id="存取儲存媒體">存取儲存媒體</h2>
-<h3 id="進入點">進入點</h3>
-<p>若使用 <a href="https://developer.mozilla.org/en-US/docs/Web/API/window.navigator.getDeviceStorage" title="/en-US/docs/Web/API/window.navigator.getDeviceStorage"><code>navigator.getDeviceStorage()</code></a> 函式,則可存取儲存區。此函式所接受的字串參數,可代表所要存取的儲存媒體名稱。函式回傳的 <a href="https://developer.mozilla.org/en-US/docs/Web/API/DeviceStorage" title="/en-US/docs/Web/API/DeviceStorage"><code>DeviceStorage</code></a> 物件,可存取相關的儲存區。</p>
-<p>Firefox OS 提供下列儲存名稱:</p>
-<ul>
- <li><code>apps:</code><code>此儲存範圍可用以儲存 </code>Apps<code> 所需的使用者資料。因為這些屬於重要資料,所以若要存取此儲存</code>區<code>,將需要額外的授權,且僅限 </code>Certified Apps。</li>
- <li><code>music</code>:音樂與音訊檔案的儲存區。</li>
- <li><code>pictures</code>:圖片檔案的儲存區。</li>
- <li><code>sdcard</code><code>:裝置的</code> SD 記憶卡儲存區。</li>
- <li><code>videos</code><code>:視訊檔案的儲存區。</code></li>
-</ul>
-<pre class="brush: js">var pics = navigator.getDeviceStorage('pictures');</pre>
-<p>為了要能使用所有儲存區,Apps 必須在自己的 manifest 檔案中載明這些儲存區。舉例來說,如果 Apps 要存取 <code>sdcard</code> 儲存區,則其 manifest 檔案中必須具備「<code>device-storage:sdcard」的授權。</code></p>
-<pre class="brush: js">"permissions": {
- "device-storage:videos":{ "access": "readonly" },
- "device-storage:pictures":{ "access": "readwrite" }
-}</pre>
-<h2 id="使用儲存媒體">使用儲存媒體</h2>
-<p>只要 Apps 能夠存取儲存區,就可在該儲存區中新增、取得、移除檔案。</p>
-<h3 id="新增檔案">新增檔案</h3>
-<p>透過 <a href="https://developer.mozilla.org/en-US/docs/Web/API/DeviceStorage.addNamed" title="/en-US/docs/Web/API/DeviceStorage.addNamed"><code>addNamed</code></a> 或 <a href="https://developer.mozilla.org/en-US/docs/Web/API/DeviceStorage.add" title="/en-US/docs/Web/API/DeviceStorage.add"><code>add</code></a> 函式,即可新增檔案。前者可在儲存檔案時,設定明確的名稱;而後者則可自動建立名稱。這 2 組函式均屬非同步函式,並將回傳 <a href="https://developer.mozilla.org/en-US/docs/Web/API/DOMRequest" title="/en-US/docs/Web/API/DOMRequest"><code>DOMRequest</code></a> 物件以處理作業的 <code>success</code> 或 <code>error</code> 狀態。因為在實體層上讀/寫檔案極為緩慢,所以此作業特別重要。</p>
-<p>這 2 組函式均以 <a href="https://developer.mozilla.org/en-US/docs/Web/API/Blob" title="/en-US/docs/Web/API/Blob"><code>Blob</code></a> 作為其第一參數。此物件將於背景之下轉為檔案並儲存起來。當建立 <a href="https://developer.mozilla.org/en-US/docs/Web/API/Blob" title="/en-US/docs/Web/API/Blob"><code>Blob</code></a> 物件時將強制給予其 <code>type,而因為某些儲存區會因類型而有所限制,所以此</code> MIME 類型格外重要:</p>
-<ul>
- <li><code>music</code> 僅接受「具備有效音訊 MIME 類型」的 <a href="https://developer.mozilla.org/en-US/docs/Web/API/Blob" title="/en-US/docs/Web/API/Blob"><code>Blob</code></a></li>
- <li><code>pictures</code> 僅接受「具備有效圖像 MIME 類型」的 <a href="https://developer.mozilla.org/en-US/docs/Web/API/Blob" title="/en-US/docs/Web/API/Blob"><code>Blob</code></a></li>
- <li><code>videos</code> 僅接受「具備有效視訊 MIME 類型」的 <a href="https://developer.mozilla.org/en-US/docs/Web/API/Blob" title="/en-US/docs/Web/API/Blob"><code>Blob</code></a></li>
-</ul>
-<pre class="brush: js">var sdcard = navigator.getDeviceStorage("sdcard");
-var file = new Blob(["This is a text file."], {type: "text/plain"});
-
-var request = sdcard.addNamed(file, "my-file.txt");
-
-request.onsuccess = function () {
- var name = this.result;
- console.log('File "' + name + '" successfully wrote on the sdcard storage area');
-}
-
-// An error typically occur if a file with the same name already exist
-request.onerror = function () {
- console.warn('Unable to write the file: ' + this.error);
-}
-</pre>
-<div class="note">
- <p><strong>注意:</strong>儲存區中的 Repository (Repo) 屬於隱性 (Implicit),因此不能建立顯性 (Explicit) 的空白 Repo。如果要使用 Repo 的結構,則必須針對 Repo 的名稱,使之成為儲存檔案名稱的一部分。所以,如果你要在 <code>foo</code> 庫中儲存 <code>bar</code> 檔案,就必須使用 <a href="https://developer.mozilla.org/en-US/docs/Web/API/DeviceStorage.addNamed" title="/en-US/docs/Web/API/DeviceStorage.addNamed"><code>addNamed</code></a> 函式再搭配 <code>addNamed(</code><em>blob</em><code>, "foo/bar") 檔案的完整路徑名稱。一旦要使用這個名稱檢索檔案,也可使用同樣的方式 </code>(參閱下列)。</p>
- <p>基於安全理由,如果檔案新增於既定的受限儲存區內,則檔案路徑名稱不能以「<code>/」或「../」開頭</code> (且「<code>./」為無意義</code>)。</p>
-</div>
-<h3 id="取得檔案">取得檔案</h3>
-<p>現有 2 種方法可檢索檔案:使用檔案名稱,或依序存取檔案列表。</p>
-<p>最簡單的方式,就是使用 <a href="https://developer.mozilla.org/en-US/docs/Web/API/DeviceStorage.get" title="/en-US/docs/Web/API/DeviceStorage.get"><code>get</code></a> 與 <a href="https://developer.mozilla.org/en-US/docs/Web/API/DeviceStorage.getEditable" title="/en-US/docs/Web/API/DeviceStorage.getEditable"><code>getEditable</code></a> 函式來檢索檔案。前者可提供<a href="https://developer.mozilla.org/en-US/docs/Web/API/File" title="/en-US/docs/Web/API/File"><code>File</code></a> 物件,即如同唯讀檔案一樣;後者則提供 <a href="https://developer.mozilla.org/en-US/docs/Web/API/FileHandle" title="/en-US/docs/Web/API/FileHandle"><code>FileHandle</code></a> 物件,可更新底層檔案 (Under-laying file)。這 2 組函式均屬非同步函式,並會回傳 <a href="https://developer.mozilla.org/en-US/docs/Web/API/DOMRequest" title="/en-US/docs/Web/API/DOMRequest"><code>DOMRequest</code></a> 物件,以處理作業的 <code>success</code> 或 <code>error</code> 狀態。</p>
-<pre class="brush: js">var sdcard = navigator.getDeviceStorage('sdcard');
-
-var request = sdcard.get("my-file.txt");
-
-request.onsuccess = function () {
- var file = this.result;
- console.log("Get the file: " + file.name);
-}
-
-request.onerror = function () {
- console.warn("Unable to get the file: " + this.error);
-}
-</pre>
-<p>另一個檔案檢索方式,就是透過 <a href="https://developer.mozilla.org/en-US/docs/Web/API/DeviceStorage.enumerate" title="/en-US/docs/Web/API/DeviceStorage.enumerate"><code>enumerate</code></a> 與 <a href="https://developer.mozilla.org/en-US/docs/Web/API/DeviceStorage.enumerateEditable" title="/en-US/docs/Web/API/DeviceStorage.enumerateEditable"><code>enumerateEditable</code></a> 函式瀏覽儲存區的內容。前者可提供 <a href="https://developer.mozilla.org/en-US/docs/Web/API/File" title="/en-US/docs/Web/API/File"><code>File</code></a> 物件;後者則提供 <a href="https://developer.mozilla.org/en-US/docs/Web/API/FileHandle" title="/en-US/docs/Web/API/FileHandle"><code>FileHandle</code></a> 物件。此 2 組均為非同步函式,並可回傳 <a href="https://developer.mozilla.org/en-US/docs/Web/API/DOMCursor" title="/en-US/docs/Web/API/DOMCursor"><code>DOMCursor</code></a> 物件以依序存取檔案列表。<a href="https://developer.mozilla.org/en-US/docs/Web/API/DOMCursor" title="/en-US/docs/Web/API/DOMCursor"><code>DOMCursor</code></a> 其實就是 <a href="https://developer.mozilla.org/en-US/docs/Web/API/DOMRequest" title="/en-US/docs/Web/API/DOMRequest"><code>DOMRequest</code></a>,但又額外具備「非同步依序存取列表 (這裡則指檔案列表)」的功能。</p>
-<pre class="brush: js">var pics = navigator.getDeviceStorage('pictures');
-
-// Let's browse all the images available
-var cursor = pics.enumerate();
-
-cursor.onsuccess = function () {
- var file = this.result;
- console.log("File found: " + file.name);
-
- // Once we found a file we check if there is other results
- if (!this.done) {
- // Then we move to the next result, which call the cursor
- // success with the next file as result.
- this.continue();
- }
-}
-
-cursor.onerror = function () {
- console.warn("No file found: " + this.error);
-}
-
-</pre>
-<p>只要傳送 2 組選擇性參數至 <a href="https://developer.mozilla.org/en-US/docs/Web/API/DeviceStorage.enumerate" title="/en-US/docs/Web/API/DeviceStorage.enumerate"><code>enumerate</code></a> 與 <a href="https://developer.mozilla.org/en-US/docs/Web/API/DeviceStorage.enumerateEditable" title="/en-US/docs/Web/API/DeviceStorage.enumerateEditable"><code>enumerateEditable</code></a> 函式,即可限制結果的數量。</p>
-<p>第一組參數可為字串,代表所要搜尋的子資料夾。</p>
-<p>第二組參數則是具備 <code>since </code>屬性的物件,可限制在既定期間內搜尋。</p>
-<pre class="brush: js">var pics = navigator.getDeviceStorage('pictures');
-
-// Lets retrieve picture from the last week.
-var param = {
- since: new Date((+new Date()) - 7*24*60*60*1000)
-}
-
-var cursor = pics.enumerate(param);
-
-cursor.onsuccess = function () {
- var file = this.result;
- console.log("Picture taken on: " + file.<code class="language-js">lastModifiedDate</code>);
-
- if (!this.done) {
- this.continue();
- }
-}
-
-</pre>
-<h3 id="刪除檔案">刪除檔案</h3>
-<p>透過 <a href="https://developer.mozilla.org/en-US/docs/Web/API/DeviceStorage.delete" title="/en-US/docs/Web/API/DeviceStorage.delete"><code>delete</code></a> 函式,即可從儲存區移除檔案。此函式僅需所要刪除的檔案名稱。如同來自於 <a href="https://developer.mozilla.org/en-US/docs/Web/API/DeviceStorage" title="/en-US/docs/Web/API/DeviceStorage"><code>DeviceStorage</code></a> 介面的其他所有函式,此函式亦屬於非同步 API,並會回傳 <a href="https://developer.mozilla.org/en-US/docs/Web/API/DOMRequest" title="/en-US/docs/Web/API/DOMRequest"><code>DOMRequest</code></a> 物件,以處理作業的 <code>success</code> 或 <code>error</code> 的狀態。</p>
-<pre class="brush: js">var sdcard = navigator.getDeviceStorage('sdcard');
-
-var request = sdcard.delete("my-file.txt");
-
-request.onsuccess = function () {
- console.log("File deleted");
-}
-
-request.onerror = function () {
- console.log("Unable to delete the file: " + this.error);
-}
-
-</pre>
-<h2 id="儲存資訊">儲存資訊</h2>
-<p>除了存取檔案之外,儲存區亦提供數個函式,可輕鬆取得某些重要資訊。</p>
-<h3 id="可用空間">可用空間</h3>
-<p>在儲存檔案時,必須先了解的要素之一就是可用空間。<a href="https://developer.mozilla.org/en-US/docs/Web/API/DeviceStorage" title="/en-US/docs/Web/API/DeviceStorage"><code>DeviceStorage</code></a> 介面則針對空間而提供 2 組有用函式:</p>
-<ul>
- <li>{{domxref("DeviceStorage.freeSpace()","freeSpace()")}} 可取得「儲存新檔案」的空間容量</li>
- <li>{{domxref("DeviceStorage.freeSpace()","usedSpace()")}} 可取得「已儲存檔案」的空間容量</li>
-</ul>
-<p>這些函式亦屬於非同步 APIs,並會回傳 <a href="https://developer.mozilla.org/en-US/docs/Web/API/DOMRequest" title="/en-US/docs/Web/API/DOMRequest"><code>DOMRequest</code></a> 物件,以處理作業的 <code>success</code> 或 <code>error</code> 的狀態。</p>
-<pre class="brush: js">var videos = navigator.getDeviceStorage('videos');
-
-var request = videos.usedSpace();
-
-request.onsuccess = function () {
- // The result is express in bytes, lets turn it into megabytes
- var size = this.result / 1000000;
-
- console.log("The videos on your device use a total of " + size.toFixed(2) + "Mo of space.");
-}
-
-request.onerror = function () {
- console.warn("Unable to get the space used by videos: " + this.error);
-}
-</pre>
-<h3 id="監聽變動狀態">監聽變動狀態</h3>
-<p>可能有許多 Apps 同時存取相同的儲存區。如果 Apps 能知道儲存區中的變化,則可避免不必要的錯誤。又若 Apps 不依賴 <a href="https://developer.mozilla.org/en-US/docs/Web/API/DeviceStorage" title="/en-US/docs/Web/API/DeviceStorage"><code>DeviceStorage</code></a> 介面的函式所回傳的 <a href="https://developer.mozilla.org/en-US/docs/Web/API/DOMRequest" title="/en-US/docs/Web/API/DOMRequest"><code>DOMRequest</code></a> 物件,卻需執行非同步作業,那得知儲存區的變化亦頗有助益。</p>
-<p>因為如此,只要建立、修改、刪除了某個檔案,就會觸發 <a href="https://developer.mozilla.org/en-US/docs/Web/Reference/Events/change" title="/en-US/docs/Web/Reference/Events/change">change</a> 事件。而透過 <a href="https://developer.mozilla.org/en-US/docs/Web/API/DeviceStorage.onchange" title="/en-US/docs/Web/API/DeviceStorage.onchange"><code>onchange</code></a> 屬性或 <a href="https://developer.mozilla.org/en-US/docs/Web/API/EventTarget.addEventListener" title="/en-US/docs/Web/API/EventTarget.addEventListener"><code>addEventListener()</code></a> 函式,即可取得這個事件。而事件處理器 (Event Handler) 所取得的 <a href="https://developer.mozilla.org/en-US/docs/Web/API/DeviceStorageChangeEvent" title="/en-US/docs/Web/API/DeviceStorageChangeEvent"><code>DeviceStorageChangeEvent</code></a> 物件,則是擁有額外 2 組屬性的常態 <a href="https://developer.mozilla.org/en-US/docs/Web/API/Event" title="/en-US/docs/Web/API/Event"><code>Event</code></a> 物件:</p>
-<ul>
- <li>{{domxref("DeviceStorageChangeEvent.reason")}} 將提供變更 (<code>created 或 modified</code> 或 <code>deleted</code>) 的理由。</li>
- <li>{{domxref("DeviceStorageChangeEvent.path")}} 則針對受變更所影響的檔案,提供其完整的路徑。</li>
-</ul>
-<pre class="brush: js">var sdcard = navigator.getDeviceStorage('sdcard');
-
-sdcard.onchange = function (change) {
- var reason = change.reason;
- var path = change.path;
-
- console.log('The file "' + path + '" has been ' + reason);
-}
-</pre>
-<h2 id="規格">規格</h2>
-<p>目前尚無規格。</p>
-<h2 id="瀏覽器相容性">瀏覽器相容性</h2>
-<p>{{ CompatibilityTable() }}</p>
-<div id="compat-desktop">
- <table class="compat-table">
- <tbody>
- <tr>
- <th>Feature</th>
- <th>Chrome</th>
- <th>Firefox (Gecko)</th>
- <th>Internet Explorer</th>
- <th>Opera</th>
- <th>Safari</th>
- </tr>
- <tr>
- <td>Basic support</td>
- <td>{{ CompatUnknown() }}</td>
- <td>{{ CompatUnknown() }}</td>
- <td>{{ CompatNo() }}</td>
- <td>{{ CompatNo() }}</td>
- <td>{{ CompatNo() }}</td>
- </tr>
- </tbody>
- </table>
-</div>
-<div id="compat-mobile">
- <table class="compat-table">
- <tbody>
- <tr>
- <th>Feature</th>
- <th>Android</th>
- <th>Firefox Mobile (Gecko)</th>
- <th>IE Mobile</th>
- <th>Opera Mobile</th>
- <th>Safari Mobile</th>
- </tr>
- <tr>
- <td>Basic support</td>
- <td>{{ CompatUnknown() }}</td>
- <td>{{ CompatUnknown() }}</td>
- <td>{{ CompatNo() }}</td>
- <td>{{ CompatNo() }}</td>
- <td>{{ CompatNo() }}</td>
- </tr>
- </tbody>
- </table>
-</div>
-<h2 id="另可參閱">另可參閱</h2>
-<ul>
- <li>{{domxref("window.navigator.getDeviceStorage()","navigator.getDeviceStorage()")}}</li>
- <li>{{domxref("DeviceStorage")}}</li>
- <li>{{domxref("DeviceStorageChangeEvent")}}</li>
-</ul>
diff --git a/files/zh-tw/webapi/idle/index.html b/files/zh-tw/webapi/idle/index.html
deleted file mode 100644
index e4eaaaaac2..0000000000
--- a/files/zh-tw/webapi/idle/index.html
+++ /dev/null
@@ -1,61 +0,0 @@
----
-title: Idle
-slug: WebAPI/Idle
-translation_of: Archive/B2G_OS/API/Idle_API
----
-<p>{{ non-standard_header() }}</p>
-<p>{{ B2GOnlyHeader2('certified') }}</p>
-<h2 id="摘要">摘要</h2>
-<p>當使用者讓裝置進入閒置/待機狀態,可通知 App 以採取相對應的行動。最常見的情形就是待機省電。而待機省電狀態又可另外搭配 <a href="https://developer.mozilla.org/en-US/docs/WebAPI/Power_Management" title="/en-US/docs/WebAPI/Power_Management">Power Management API</a>。</p>
-<h2 id="Idle_Observer">Idle Observer</h2>
-<p>若要讓任一 App 收到「系統閒置」的通知,就必須先註冊 Idle Observer。而 Idle Observer 物件具備了 3 項屬性:</p>
-<ul>
- <li><code>time</code> 屬性將定義使用者最後的動作之後,理應進入閒置/待機狀態的時間 (以秒計算)。</li>
- <li><code>onidle</code> 屬性則是判斷使用者閒置之後,所會呼叫的函式。</li>
- <li><code>onactive</code> 屬性則是使用者再度啟動裝置之後,所會呼叫的函式。</li>
-</ul>
-<pre class="brush: js">// NOTE: mozPower is part of the Power Management API
-
-var fadeLight = {
- time: 10, // Ten seconds
-
- onidle: function () {
- // The user does not seem active, let's dim the screen down
- navigator.mozPower.screenBrightness = 0.5;
- },
-
- onactive: function () {
- // Ok, the user is back, let's brighten the screen up
- navigator.mozPower.screenBrightness = 1;
- }
-}
-
-var screenOff = {
- time: 15, // fifteen seconds
-
- onidle: function () {
- // Ok, the user had his chance but he's really idle, let's turn the screen off
- navigator.mozPower.screenEnabled = false;
- },
-
- onactive: function () {
- // Ok, the user is back, let's turn the screen on
- navigator.mozPower.screenEnabled = true;
- }
-}
-</pre>
-<p>任一 App 均可依需要而定義為多個 Idle Observer。但不論定義成幾個 Idle Observer,都必須以 <a href="https://developer.mozilla.org/en-US/docs/DOM/window.navigator.addIdleObserver" title="/en-US/docs/DOM/window.navigator.addIdleObserver"><code>navigator.addIdleObserver()</code></a> 函式完成註冊,才能由系統所處理。</p>
-<pre class="brush: js">navigator.addIdleObserver(fadeLight);
-navigator.addIdleObserver(screenOff);
-</pre>
-<p>又如果 App 不再需要知道使用者是否閒置了系統,則可透過 <a href="https://developer.mozilla.org/en-US/docs/DOM/window.navigator.removeIdleObserver" title="/en-US/docs/DOM/window.navigator.removeIdleObserver"><code>navigator.removeIdleObserver()</code></a> 函式移除 Idle Observer。</p>
-<pre class="brush: js">navigator.removeIdleObserver(fadeLight);
-navigator.removeIdleObserver(screenOff);
-</pre>
-<h2 id="規格">規格</h2>
-<p>目前仍未有任何規格,但 W3C 將此 API 納入為 <a href="http://www.w3.org/2012/sysapps/" title="http://www.w3.org/2012/sysapps/">System Applications Working Group</a> 討論的一部分。</p>
-<h2 id="另可參閱">另可參閱</h2>
-<ul>
- <li>{{domxref("window.navigator.addIdleObserver","navigator.addIdleObserver")}}</li>
- <li>{{domxref("window.navigator.removeIdleObserver","navigator.removeIdleObserver")}}</li>
-</ul>
diff --git a/files/zh-tw/webapi/network_stats/index.html b/files/zh-tw/webapi/network_stats/index.html
deleted file mode 100644
index c9aa8a94c1..0000000000
--- a/files/zh-tw/webapi/network_stats/index.html
+++ /dev/null
@@ -1,86 +0,0 @@
----
-title: 網路流量統計
-slug: WebAPI/Network_Stats
-translation_of: Archive/B2G_OS/API/Network_Stats_API
----
-<p>{{ non-standard_header() }}</p>
-<p>{{ B2GOnlyHeader2('certified') }}</p>
-<h2 id="摘要">摘要</h2>
-<p>Network Stats API 將監控資料用量,並將此數據提供給 Certified Apps。</p>
-<p><a href="https://developer.mozilla.org/en-US/docs/Web/API/window.navigator.mozNetworkStats" title="Returns a MozNetworkStatsManager object you can use to access data amount information."><code>navigator.mozNetworkStats</code></a> 屬於 <a href="https://developer.mozilla.org/en-US/docs/Web/API/MozNetworkStatsManager" title="The MozNetworkStatsManager interface provides methods and properties to monitor data usage."><code>MozNetworkStatsManager</code></a> 介面的實體 (Instance)。透過 <a href="https://developer.mozilla.org/en-US/docs/Web/API/window.navigator.mozNetworkStats" title="Returns a MozNetworkStatsManager object you can use to access data amount information."><code>navigator.mozNetworkStats</code></a> 即可取得相關資料。</p>
-<h2 id="存取資料">存取資料</h2>
-<p>有關已接收/已傳送資料量的資訊,均將由系統自動儲存。而 <a href="https://developer.mozilla.org/en-US/docs/Web/API/MozNetworkStatsManager.getNetworkStats" title="The getNetworkStats method allows to retrieve the data usage statistics for the various connection types."><code>MozNetworkStatsManager.getNetworkStats()</code></a> 函式可存取相關資訊。此函式的第一組參數屬於組態物件,且必備下列屬性:</p>
-<ul>
- <li><code>start</code>:資料物件,代表資料統計開始。</li>
- <li><code>end</code>:資料物件,代表資料統計結束。</li>
- <li><code>connectionType</code>:資料來源,亦即連線類型。可能為「<code>wifi</code>」<code>或</code>「<code>mobile</code>」<code>或</code>「<code>null</code>」<code>。若為</code> <code>null,則會合併此 2 項來源的資料統計量。若要事先知道資料來源是否有效,則 </code><a href="https://developer.mozilla.org/en-US/docs/Web/API/MozNetworkStatsManager.connectionTypes" title="The connectionTypes property is a list of all possible monitored connection type by the current device."><code>MozNetworkStatsManager.connectionTypes</code></a> 屬性可回傳由字串 (代表各種支援的連線類型) 所構成的 <a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array" title="/en-US/docs/JavaScript/Reference/Global_Objects/Array"><code>Array</code></a>。</li>
-</ul>
-<p>一旦呼叫此函式,隨即回傳 <a href="https://developer.mozilla.org/en-US/docs/Web/API/DOMRequest" title="A DOMRequest object represents an ongoing operation. It provides callbacks that are called when the operation completes, as well as a reference to the operation's result. A DOM method that initiates an ongoing operation may return a DOMRequest object that"><code>DOMRequest</code></a> 以處理資訊請求的成功或失敗狀態。若為成功狀態,則請求的 <code>result</code> 即為 <a href="https://developer.mozilla.org/en-US/docs/Web/API/MozNetworkStats" title="The MozNetworkStats objects gives access to statistics about the data usage for a given network."><code>MozNetworkStats</code></a> 物件。</p>
-<pre class="brush: js">var manageWifi = navigator.mozNetworkStats.connectionTypes.indexOf('wifi') &gt; -1;
-var manageMobile = navigator.mozNetworkStats.connectionTypes.indexOf('mobile') &gt; -1;
-
-var config = {
- start: new Date(),
- end : new Date(),
- connectionType: manageWifi ? 'wifi' : null
-};
-
-var request = navigator.mozNetworkStats.getNetworkStats(config);
-
-request.onsuccess = function () {
- console.log("Data received: " + request.result.data[0].rxBytes + " bytes");
- console.log("Data sent: " + request.result.data[0].txBytes + " bytes")
-}
-
-request.onerror = function () {
- console.log("Something goes wrong: ", request.error);
-}
-</pre>
-<h2 id="隨著時間連續取樣">隨著時間連續取樣</h2>
-<p>資料總量的相關資訊均儲存於區塊 (Chunk) 中,以利隨時查看資料流量。各個區塊均為 1 組值,代表上個區塊儲存之後所交換的資料總量。</p>
-<p>在請求統計資料時,<a href="https://developer.mozilla.org/en-US/docs/Web/API/MozNetworkStats" title="The MozNetworkStats objects gives access to statistics about the data usage for a given network."><code>MozNetworkStats</code></a> 物件將針對 <code>start</code> 與 <code>end</code> 日期之間所定義的間隔,儘量攜帶夠多的資料區塊。區塊的總數將因下列 2 組參數 (均屬唯讀參數) 而有所變化:</p>
-<ul>
- <li><a href="https://developer.mozilla.org/en-US/docs/Web/API/MozNetworkStatsManager.sampleRate" title="The sampleRate property indicates the time in second between two data usage chunk are stored."><code>MozNetworkStatsManager.sampleRate</code></a> 代表 2 組區塊之間的時間,以秒計算。</li>
- <li><a href="https://developer.mozilla.org/en-US/docs/Web/API/MozNetworkStatsManager.maxStorageSamples" title="The maxStorageSamples property indicates the maximum number of date usage chunk stored for each type of connection."><code>MozNetworkStatsManager.maxStorageSamples</code></a> 代表各種連線類型的最大區塊數量。</li>
-</ul>
-<p>各個資料區塊均為 1 個 <a href="https://developer.mozilla.org/en-US/docs/Web/API/MozNetworkStatsData" title="The MozNetworkStatsData objects represent a chunk of data usage statistics."><code>MozNetworkStatsData</code></a> 物件。透過<a href="https://developer.mozilla.org/en-US/docs/Web/API/MozNetworkStats.data" title="The data property is a list of data usage statistics chunk. Each chunk is a MozNetworkStatsData providing the total amount a bytes received and send during a given amount of time (this amount of time is accessible through the MozNetworkStatsManager.sample"><code>MozNetworkStats.data</code></a> 屬性即可取得各個既定時間框架 (Time frame) 的所有資料區塊,進而形成 <a href="https://developer.mozilla.org/en-US/docs/Web/API/MozNetworkStatsData" title="The MozNetworkStatsData objects represent a chunk of data usage statistics."><code>MozNetworkStatsData</code></a> 物件的 <a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array" title="/en-US/docs/JavaScript/Reference/Global_Objects/Array"><code>Array</code></a>。</p>
-<pre class="brush: js">var rate = navigator.mozNetworkStats.sampleRate;
-var max = navigator.mozNetworkStats.maxStorageSample;
-
-var config = {
- start: new Date() - (rate * max), // This allows to get all the available data chunks.
- end : new Date(),
- connectionType: 'mobile'
-};
-
-var request = navigator.mozNetworkStats.getNetworkStats(config);
-
-request.onsuccess = function () {
- var total = {
- receive: 0,
- send : 0
- };
-
- this.result.forEach(function (chunk) {
- total.receive += chunk.rxBytes;
- total.send += chunk.txBytes;
- });
-
- console.log("Since: " + config.start.toString());
- console.log("Data received: " + (total.receive * 1000).toFixed(2) + "Ko");
- console.log("Data sent: " + (total.send * 1000).toFixed(2) + "Ko")
-}
-
-request.onerror = function () {
- console.log("Something goes wrong: ", request.error);
-}</pre>
-<h2 id="規格">規格</h2>
-<p>尚無任何規格。</p>
-<h2 id="另可參閱">另可參閱</h2>
-<ul>
- <li>{{domxref("window.navigator.mozNetworkStats","navigator.mozNetworkStats")}}</li>
- <li>{{domxref("MozNetworkStats")}}</li>
- <li>{{domxref("MozNetworkStatsData")}}</li>
- <li>{{domxref("MozNetworkStatsManager")}}</li>
- <li><a href="/en-US/docs/WebAPI/Network_Stats_2_0_proposal" title="/en-US/docs/WebAPI/Network_Stats_2_0_proposal">NetworkStats API 2.0 proposal</a></li>
-</ul>
diff --git a/files/zh-tw/webapi/power_management/index.html b/files/zh-tw/webapi/power_management/index.html
deleted file mode 100644
index da501d4238..0000000000
--- a/files/zh-tw/webapi/power_management/index.html
+++ /dev/null
@@ -1,102 +0,0 @@
----
-title: Power Management
-slug: WebAPI/Power_Management
-translation_of: Archive/B2G_OS/API/Power_Management_API
----
-<p>{{ non-standard_header() }}</p>
-<p>{{ B2GOnlyHeader2('certified') }}</p>
-<h2 id="摘要">摘要</h2>
-<p>Power Management API 可管理裝置的耗電情形。</p>
-<h2 id="管理電力">管理電力</h2>
-<p>電力管理與電力本身不盡相同,如避免大量耗電、限制回流 (Reflow) 等等,都屬於電源管理的一部分。而 Power Management API 則直接控管如 CPU 與螢幕等的耗電量。透過 <a href="https://developer.mozilla.org/en-US/docs/Web/API/window.navigator.mozPower" title="/en-US/docs/Web/API/window.navigator.mozPower"><code>navigator.mozPower</code></a> 即可存取電力管理的主要介面。而 <a href="https://developer.mozilla.org/en-US/docs/Web/API/window.navigator.mozPower" title="/en-US/docs/Web/API/window.navigator.mozPower"><code>navigator.mozPower</code></a> 則為 <a href="https://developer.mozilla.org/en-US/docs/Web/API/PowerManager" title="/en-US/docs/Web/API/PowerManager"><code>PowerManager</code></a> 介面的實例 (Instance)。</p>
-<h3 id="基本電力操作">基本電力操作</h3>
-<p><a href="https://developer.mozilla.org/en-US/docs/Web/API/PowerManager" title="/en-US/docs/Web/API/PowerManager"><code>PowerManager</code></a> 介面可管理基本的電力操作情形。</p>
-<h4 id="通用電力操作">通用電力操作</h4>
-<p><a href="https://developer.mozilla.org/en-US/docs/Web/API/PowerManager.powerOff" title="/en-US/docs/Web/API/PowerManager.powerOff"><code>powerOff()</code></a> 函式可關閉裝置;<a href="https://developer.mozilla.org/en-US/docs/Web/API/PowerManager.reboot" title="/en-US/docs/Web/API/PowerManager.reboot"><code>reboot()</code></a> 函式則可重新開機。</p>
-<pre class="brush: js">navigator.mozPower.powerOff();</pre>
-<h4 id="螢幕電力操作">螢幕電力操作</h4>
-<p>透過可讀寫的 <a href="https://developer.mozilla.org/en-US/docs/Web/API/PowerManager.screenEnabled" title="/en-US/docs/Web/API/PowerManager.screenEnabled"><code>screenEnabled</code></a> 屬性即可開/關螢幕畫面;而存取/更改畫面亮度也能達到相同效果。如可讀寫的 <a href="https://developer.mozilla.org/en-US/docs/Web/API/PowerManager.screenBrightness" title="/en-US/docs/Web/API/PowerManager.screenBrightness"><code>screenBrightness</code></a> (用以定義螢幕背光的亮度) 就能變更畫面亮度,可調整為 0 (全暗) 到 1 (全亮)。</p>
-<pre class="brush: js">// It doesn't make sense to change the brightness if the screen is off
-if (navigator.mozPower.screenEnabled) {
- navigator.mozPower.screenBrightness = 0.5;
-}</pre>
-<h4 id="CPU_電力操作">CPU 電力操作</h4>
-<p>目前並無法直接關閉 CPU。但可進一步設定 <a href="https://developer.mozilla.org/en-US/docs/Web/API/PowerManager.cpuSleepAllowed" title="/en-US/docs/Web/API/PowerManager.cpuSleepAllowed"><code>cpuSleepAllowed</code></a>,以決定關閉畫面之時是否要關閉 CPU。在畫面關閉 (<code>true</code>) 或開啟 (<code>false</code>) 時,此函式可定義是否讓裝置的 CPU 休眠。若畫面處於開啟狀態 (<code>false</code>),則該函式將避免裝置進入靜止狀態。</p>
-<h3 id="進階電力操作">進階電力操作</h3>
-<p>若管理電力的 Apps 可確實接收到第三方 Apps 的需求通知,就能達到更好的電力管理效果。舉例來說,在使用者欣賞影片時,當然不希望系統在幾分鐘之後自動關閉畫面。</p>
-<h4 id="請求_Wake_locks">請求 Wake locks</h4>
-<p>任何 Apps 均可請求 Wake locks,避免裝置切斷 Apps 本身所需資源的電力。可透過 <a href="https://developer.mozilla.org/en-US/docs/Web/API/window.navigator.requestWakeLock" title="/en-US/docs/Web/API/window.navigator.requestWakeLock"><code>navigator.requestWakeLock()</code></a> 函式請求 Wake locks。</p>
-<p>特定資源所要求的 Wake locks,可能會因不同的理由而取消。舉例來說,行動裝置的電力管理功能,可能會在閒置一段時間之後決定關閉畫面,進而達到省電目的。在關閉相關資源之前,處理資源的 Apps 往往會檢查相關資源的鎖定狀態。再舉個例子,某個頁面可能持續 <code>screen </code>上的鎖定狀態,以避免畫面關閉或螢幕保護程式運作。</p>
-<p>依預設值,Firefox OS 允許 <code>screen、cpu、wifi</code> 資源。但只要是處理資源的任何 App 均可定義資源名稱,並針對該鎖定功能設定規則。舉例來說,資源管理功能可無視 Apps 對 <code>screen</code> 所進行的 Wake locks,讓 Apps 無法插手鎖定狀態。</p>
-<pre class="brush: js">var lock = navigator.requestWakeLock('screen');</pre>
-<p><a href="https://developer.mozilla.org/en-US/docs/Web/API/window.navigator.requestWakeLock" title="/en-US/docs/Web/API/window.navigator.requestWakeLock"><code>requestWakeLock</code></a> 函式所回傳的物件將包含 <code>topic</code> 屬性,代表目前要鎖定的資源。而 <code>unlock()</code> 函式可供手動解鎖。另請注意,若 App 進入關閉狀態 (真的關閉,而不是閒置),就會自動送出該 App 需要的所有鎖定請求。</p>
-<h4 id="處理_Wake_locks">處理 Wake locks</h4>
-<p>只要是可管理鎖定的 Certified Apps,均可得知鎖定狀態的變化。其實任何管理電力的 Apps 均應監聽 <code>screen</code> 與 <code>cpu 鎖定狀態的變化。透過</code> <a href="https://developer.mozilla.org/en-US/docs/Web/API/PowerManager.addWakeLockListener" title="/en-US/docs/Web/API/PowerManager.addWakeLockListener"><code>PowerManager.addWakeLockListener()</code></a> 函式即可達到此目的。另可透過 <a href="https://developer.mozilla.org/en-US/docs/Web/API/PowerManager.removeWakeLockListener" title="/en-US/docs/Web/API/PowerManager.removeWakeLockListener"><code>PowerManager.removeWakeLockListener()</code></a> 函式而停止監聽鎖定請求。</p>
-<p><a href="https://developer.mozilla.org/en-US/docs/Web/API/PowerManager.addWakeLockListener" title="/en-US/docs/Web/API/PowerManager.addWakeLockListener"><code>addWakeLockListener</code></a> 函式所接收的回呼 (Callback) 需具備 2 組參數。第一組字串代表應處理的資源 (本範例為 <code>screen</code> 或 <code>cpu</code>);第二組字串則代表鎖定的狀態。</p>
-<p>鎖定可分為 3 種狀態:</p>
-<dl>
- <dt>
- <code>unlocked</code></dt>
- <dd>
- 沒有任何 App 針對既有資源持續 Wake lock。</dd>
- <dt>
- <code>locked-foreground</code></dt>
- <dd>
- 至少 1 個 App 持續 Wake lock,且於前景顯示該 App。</dd>
- <dt>
- <code>locked-background</code></dt>
- <dd>
- 至少 1 個 App 持續 Wake lock,但所有 Apps 均在背景而未顯示。</dd>
-</dl>
-<pre class="brush: js">// This is used to keep track of the last change on the lock state
-var screenTimeout;
-
-// A reference to the Power Manager
-var power = window.navigator.mozPower;
-
-// Here are the actions to handle based on the lock state
-var powerAction = {
-
- // If there is no lock at all, we will suspend the device:
- // * Turn the screen off
- // * Allow the cpu to shut down
- unlocked: function suspendDevice() {
- power.cpuSleepAllowed = true;
- power.screenEnabled = false;
- },
-
- // If there is a lock but the applications requesting it
- // are all in the background, we just turn the screen off
- 'locked-background': function shutOffOnlyScreen() {
- power.cpuSleepAllowed = false;
- power.screenEnabled = false;
- },
-
- // At last, if there is an active application that requests a lock,
- // actually there is nothing to do. That's the whole point.
-}
-
-function screenLockListener(topic, state) {
- // If the lock is not about the screen, there is nothing to do.
- if ('screen' !== topic) return;
-
- // Each time the lock changes state, we stop any pending power management operations
- window.clearTimeout(screenTimeout);
-
- // If there is an action defined for the given state
- if (powerAction[state]) {
- // We delay that action by 3s
- screenTimeout = window.setTimeout(powerAction[state], 3000);
- }
-}
-
-// We make sure our power management application is listening for any change on locks.
-power.addWakeLockListener(screenLockListener);</pre>
-<h2 id="Specification" name="Specification">規格</h2>
-<p>尚無任何規格。</p>
-<h2 id="另可參閱">另可參閱</h2>
-<ul>
- <li>{{ domxref("window.navigator.mozPower","navigator.mozPower") }}</li>
- <li>{{ domxref("PowerManager") }}</li>
- <li>{{ domxref("window.navigator.requestWakeLock()","navigator.requestWakeLock()") }}</li>
-</ul>
diff --git a/files/zh-tw/webapi/settings/index.html b/files/zh-tw/webapi/settings/index.html
deleted file mode 100644
index 2e5198a2a0..0000000000
--- a/files/zh-tw/webapi/settings/index.html
+++ /dev/null
@@ -1,69 +0,0 @@
----
-title: Settings API
-slug: WebAPI/Settings
-translation_of: Archive/B2G_OS/API/Settings_API
----
-<p>{{ non-standard_header() }}</p>
-<p>{{ B2GOnlyHeader2('certified') }}</p>
-<h2 id="摘要">摘要</h2>
-<p>Settings API 可存取、變更、監聽裝置設定的任何變化。裝置的設定選項可能帶有高敏感度的資訊並可能危害整個系統,因此僅限 Certified Apps 可使用此 API。</p>
-<h2 id="使用設定選項">使用設定選項</h2>
-<p>透過 <a href="https://developer.mozilla.org/en-US/docs/Web/API/window.navigator.mozSettings" title="/en-US/docs/Web/API/window.navigator.mozSettings"><code>naviator.mozSettings</code></a> 物件 (即 <a href="https://developer.mozilla.org/en-US/docs/Web/API/SettingsManager" title="/en-US/docs/Web/API/SettingsManager"><code>SettingsManager</code></a> 介面的實例),即可操作設定選項。</p>
-<h3 id="存取設定選項">存取設定選項</h3>
-<p>若要存取設定選項,必須先以 <a href="https://developer.mozilla.org/en-US/docs/Web/API/SettingsManager.createLock" title="/en-US/docs/Web/API/SettingsManager.createLock"><code>createLock()</code></a> 函式建立鎖定機制。因為可能有多個 Apps 同時存取並更改設定,所以必須確保各個 App 不會受到其他 Apps 的影響。而建立鎖定機制之後,各個 App 均可於特定時間單獨存取設定。</p>
-<p>在 Apps 擁有鎖定機制後,即可透過 <a href="https://developer.mozilla.org/en-US/docs/Web/API/SettingsLock.get" title="/en-US/docs/Web/API/SettingsLock.get"><code>get()</code></a> 函式讀取任何設定。此函式將回傳 <a href="https://developer.mozilla.org/en-US/docs/Web/API/DOMRequest" title="/en-US/docs/Web/API/DOMRequest"><code>DOMRequest</code></a> 物件,以處理成功或失敗的作業。不論任何狀況下,只要完成了成功/失敗的請求,均會自動解鎖之後才讓其他 Apps 存取設定。若有必要,也可透過鎖定機制的 <a href="https://developer.mozilla.org/en-US/docs/Web/API/SettingsLock.closed" title="/en-US/docs/Web/API/SettingsLock.closed"><code>closed</code></a> 屬性,得知是否已解開鎖定。</p>
-<p>在下列程式碼片段中,則建立了鎖定並請求了系統 <code>wifi.enabled</code> 設定的數值。另呼叫 <a href="https://developer.mozilla.org/en-US/docs/Web/API/console.log" title="Outputs a message to the Web Console."><code>console.log()</code></a> 即可於主控台上顯示輸出的結果:</p>
-<pre class="brush: js">var lock = navigator.mozSettings.createLock();
-var setting = lock.get('wifi.enabled');
-
-setting.onsuccess = function () {
- console.log('wifi.enabled: ' + setting.result);
-}
-
-setting.onerror = function () {
- console.warn('An error occured: ' + setting.error);
-}
-</pre>
-<h3 id="更改設定">更改設定</h3>
-<p>設定值的更改程序與存取程序完全相同,但必須呼叫 <a href="https://developer.mozilla.org/en-US/docs/Web/API/SettingsLock.set" title="/en-US/docs/Web/API/SettingsLock.set"><code>set()</code></a> 函式,此函式將回傳 <a href="https://developer.mozilla.org/en-US/docs/Web/API/DOMRequest" title="/en-US/docs/Web/API/DOMRequest"><code>DOMRequest</code></a> 物件,讓你知道設定更改請求是否成功。</p>
-<p><a href="https://developer.mozilla.org/en-US/docs/Web/API/SettingsLock.set" title="/en-US/docs/Web/API/SettingsLock.set"><code>set()</code></a> 函式會將物件作為自己的輸入參數。此物件為鍵值/數值的集合,而各個鍵值即代表 1 組設定的名稱,對應的數值又是設定的新數值。可參閱 <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Platform/Settings_list" title="/en-US/docs/Mozilla/Firefox_OS/Platform/Settings_list">Firefox OS 設定清單</a>以進一步了解 (另請注意,不同裝置所使用的設定亦將有所差異)。</p>
-<p>這裡可看到建立的 1 組鎖定,並於主控台上顯示 <code>wifi.enabled</code> 設定的結果。</p>
-<pre class="brush: js">var lock = navigator.mozSettings.createLock();
-var result = lock.set({
- 'wifi.enabled': true
-});
-
-result.onsuccess = function () {
- console.log("the settings has been changed");
-}
-
-result.onerror = function () {
- console.log("An error occure, the settings remain unchanged");
-}</pre>
-<h3 id="監聽設定中的變化">監聽設定中的變化</h3>
-<p>App 除了讀取、更改設定之外,亦可監聽發生過的任何變更。只要變更過設定,系統隨即觸發 <a href="https://developer.mozilla.org/en-US/docs/Web/Reference/Events/settingchange" title="/en-US/docs/Web/Reference/Events/settingchange">settingchange</a> 事件。此事件為 <a href="https://developer.mozilla.org/en-US/docs/Web/API/MozSettingEvent" title="/en-US/docs/Web/API/MozSettingEvent"><code>MozSettingEvent</code></a>。此常態事件又可透過 2 項額外屬性進一步延伸:</p>
-<ul>
- <li><a href="https://developer.mozilla.org/en-US/docs/Web/API/MozSettingEvent.settingName" title="/en-US/docs/Web/API/MozSettingEvent.settingName"><code>settingName</code></a> 可提供變更過的設定名稱。</li>
- <li><a href="https://developer.mozilla.org/en-US/docs/Web/API/MozSettingEvent.settingValue" title="/en-US/docs/Web/API/MozSettingEvent.settingValue"><code>settingValue</code></a> 可提供設定的新值。</li>
-</ul>
-<p>只要設定 <a href="https://developer.mozilla.org/en-US/docs/Web/API/SettingsManager.onsettingchange" title="/en-US/docs/Web/API/SettingsManager.onsettingchange"><code>SettingsManager.onsettingchange</code></a> 以指定 1 組回呼 (Callback,只要設定改變就會呼叫該回呼) 即可監聽 <a href="https://developer.mozilla.org/en-US/docs/Web/Reference/Events/settingchange" title="/en-US/docs/Web/Reference/Events/settingchange">settingchange</a> 事件。如果只想監聽某一特定設定的變化,則可呼叫如下的 <a href="https://developer.mozilla.org/en-US/docs/Web/API/SettingsManager.addObserver" title="/en-US/docs/Web/API/SettingsManager.addObserver"><code>SettingsManager.addObserver()</code></a> 函式:</p>
-<pre class="brush: js">function handleWifi(event) {
- if (event.settingValue === true) {
- console.log("Hey! I can download that crazy heavy 4GB file")
- } else {
- console.log("Oh! I should stop downloading that crazy 4GB file")
- }
-}
-
-navigator.mozSettings.addObserver('wifi.enabled', handleWifi);
-</pre>
-<p> </p>
-<h2 id="規格">規格</h2>
-<p>目前仍未有任何規格。可參與 W3C 於 <a href="http://www.w3.org/2012/sysapps/" title="http://www.w3.org/2012/sysapps/">System Applications Working Group</a> 中對此API 的討論。</p>
-<h2 id="另可參閱">另可參閱</h2>
-<ul>
- <li>{{domxref("window.navigator.mozSettings","naviator.mozSettings")}}</li>
- <li>{{domxref("SettingsManager")}}</li>
- <li>{{domxref("SettingsLock")}}</li>
- <li>{{domxref("MozSettingEvent")}}</li>
-</ul>
diff --git a/files/zh-tw/webapi/simple_push/index.html b/files/zh-tw/webapi/simple_push/index.html
deleted file mode 100644
index da0015bd11..0000000000
--- a/files/zh-tw/webapi/simple_push/index.html
+++ /dev/null
@@ -1,115 +0,0 @@
----
-title: Simple Push API
-slug: WebAPI/Simple_Push
-translation_of: Archive/B2G_OS/API/Simple_Push_API
----
-<p>{{ SeeCompatTable() }}</p>
-<p><a href="https://wiki.mozilla.org/WebAPI/SimplePush" title="https://wiki.mozilla.org/WebAPI/SimplePush">Simple Push API</a> 也是所謂的 Push Notification API,可在接收通知時喚醒 App。多個 App 可請求「共用其伺服器」的單一網址,以便傳送 App 的後續版本號碼。另外亦可作為同步化機制,從第三方伺服器取得最新資料。</p>
-<p>SimplePush API 可透過 push 屬性 (來自於 <a href="https://developer.mozilla.org/en-US/docs/Web/API/PushManager" title="/en-US/docs/Web/API/PushManager">PushManager</a> 專案) 而擴充 <a href="https://developer.mozilla.org/en-US/docs/Web/API/window.navigator" title="/en-US/docs/Web/API/window.navigator">window.navigator</a>,並添增新的事件給使用者,以監控推播 (Push) 的狀態。</p>
-<h2 id="範例">範例</h2>
-<p>在本範例中,我們將依照下列步驟而設定完整的推播:</p>
-<ol>
- <li>將 <code>push</code> <code>的授權</code>新增至 manifest 檔案中</li>
- <li>呼叫 <code>push.register()</code> 以請求終端 (Endpoint)</li>
- <li>將終端傳送到自己的伺服器</li>
- <li>針對 App 之內的推播通知,新增訊息處理器 (Message handler)</li>
- <li>從自己的伺服器中送出通知</li>
-</ol>
-<h3 id="修改_manifest_檔案">修改 manifest 檔案</h3>
-<p>另外需修改 manifest 檔案中的 2 個地方:</p>
-<ol>
- <li><a href="https://developer.mozilla.org/docs/Web/Apps/Manifest#messages" title="https://developer.mozilla.org/en-US/docs/Web/Apps/Manifest?redirectlocale=en-US&amp;redirectslug=Apps%2FManifest#messages">messages 欄位</a>:新增<code> push</code> 與 <code>push-register</code> 訊息。</li>
- <li><a href="https://developer.mozilla.org/docs/Web/Apps/Manifest#permissions" title="https://developer.mozilla.org/en-US/docs/Web/Apps/Manifest?redirectlocale=en-US&amp;redirectslug=Apps%2FManifest#permissions">permissions 欄位</a>:新增想要接收推播通知的 App。</li>
-</ol>
-<pre><span class="s2">"messages"</span><span class="o">:</span> <span class="cp">[</span>
- <span class="p">{</span> <span class="s2">"push"</span><span class="p">:</span> <span class="s2">"/index.html"</span><span class="p">},</span>
- <span class="p">{</span> <span class="s2">"push-register"</span><span class="p">:</span> <span class="s2">"/index.html"</span><span class="p">}</span>
-<span class="cp">]</span><span class="o">,</span>
-<span class="s2">"permissions"</span><span class="o">:</span> <span class="p">{</span>
- <span class="s2">"push"</span><span class="o">:</span> <span class="err">{
- </span>"description": "Required for be updated with new goals in soccer matchs",<span class="err">
-</span><span class="p"> }</span>
-<span class="err">}</span></pre>
-<h3 id="呼叫_domxref(PushManager.register)_以請求終端">呼叫 {{domxref("PushManager.register")}} 以請求終端</h3>
-<p>一旦你認為該是請求終端的時候 (例如使用者登入,或有人想看場棒球賽的時候),即可呼叫此程式碼。</p>
-<pre><span class="k">if</span> <span class="p">(</span><span class="nx">navigator</span><span class="p">.</span><span class="nx">push</span><span class="p">)</span> <span class="p">{</span>
- <span class="kd">var</span> <span class="nx">req</span> <span class="o">=</span> <span class="nx">navigator</span><span class="p">.</span><span class="nx">push</span><span class="p">.</span><span class="nx">register</span><span class="p">();</span>
-
- <span class="nx">req</span><span class="p">.</span><span class="brush: js">onsuccess</span> <span class="o">=</span> <span class="kd">function</span><span class="p">(</span><span class="nx">e</span><span class="p">)</span> <span class="p">{</span>
- <span class="kd">var</span> <span class="nx">endpoint</span> <span class="o">=</span> <span class="nx">req</span><span class="p">.</span><span class="nx">result</span><span class="p">;</span>
- <span class="nx">debug</span><span class="p">(</span><span class="s2">"New endpoint: "</span> <span class="o">+</span> <span class="nx">endpoint</span> <span class="p">);</span>
- <span class="p">}</span>
-
- <span class="nx">req</span><span class="p">.</span><span class="nx">onerror</span> <span class="o">=</span> <span class="kd">function</span><span class="p">(</span><span class="nx">e</span><span class="p">)</span> <span class="p">{</span>
- <span class="nx">debug</span><span class="p">(</span><span class="s2">"Error getting a new endpoint: "</span> <span class="o">+</span> <span class="nx">JSON</span><span class="p">.</span><span class="nx">stringify</span><span class="p">(</span><span class="nx">e</span><span class="p">));</span>
- <span class="p">}</span>
-<span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
- <span class="c1">// No push on the DOM</span>
-<span class="p">}</span></pre>
-<h3 id="將終端傳送至自己的伺服器">將終端傳送至自己的伺服器</h3>
-<p>一旦獲得終端之後,就必須將之傳送至自己的 App 伺服器上。現有很多傳送終端的方法,如寄送電子郵件,或透過 <code>POST、</code><code>PUT、</code><code>GET</code><code> </code>均可傳送終端。我們建議以「來自於 App 的使用者資料」來儲存終端,例如 cookie、使用者名稱,或任何你用來識別終端使用者的資料均可。</p>
-<p>但如果你正把資料傳送到伺服器,我們還是建議下列要點:</p>
-<ol>
- <li>以 XMLHttpRequest 傳送。</li>
- <li>最好使用 HTTPS。如果某人中斷了你的終端,即可開始將通知傳送到自己的 App。</li>
- <li>使用如 cookie 的機制,可比對使用者 (或 App 安裝作業) 與終端。</li>
-</ol>
-<h3 id="新增_push_訊息處理器">新增 <code>push</code> 訊息處理器</h3>
-<p>一旦設定終端完畢,就可讓 App 開始監聽推播訊息。此功能亦可註冊在主要的 <code>index.html</code> 檔案,或註冊在自己的 <code>main.js</code> 指令碼中;也能註冊在特殊的 <code>push-message.html</code> 檔案 (特殊之處在於該檔案之內僅有指令碼) 上。這功能之所以方便的原因在於:如果接收到 <code>push</code> 訊息且 App 處於關閉狀態時,則該 App 只會載入一小部分的 HTML/JavaScript 程式碼,而且你也可以決定是否要完全開啟 App,或在背景中執行某些作業即可。</p>
-<pre><span class="k">if</span> <span class="p">(</span><span class="nb">window</span><span class="p">.</span><span class="nx">navigator</span><span class="p">.</span><span class="nx">mozSetMessageHandler</span><span class="p">)</span> <span class="p">{</span>
- <span class="nb">window</span><span class="p">.</span><span class="nx">navigator</span><span class="p">.</span><span class="nx">mozSetMessageHandler</span><span class="p">(</span><span class="s1">'push'</span><span class="p">,</span> <span class="kd">function</span><span class="p">(</span><span class="nx">e</span><span class="p">)</span> <span class="p">{</span>
- <span class="nx">debug</span><span class="p">(</span><span class="s1">'My endpoint is '</span> <span class="o">+</span> <span class="nx">e</span><span class="p">.</span><span class="nx">pushEndpoint</span><span class="p">);</span>
- <span class="nx">debug</span><span class="p">(</span><span class="s1">'My new version is '</span> <span class="o">+</span> <span class="nx">e</span><span class="p">.</span><span class="nx">version</span><span class="p">);</span>
- <span class="c1">//Remember that you can handle here if you have more than</span>
- <span class="c1">//one pushEndpoint</span>
- <span class="k">if</span> <span class="p">(</span><span class="nx">e</span><span class="p">.</span><span class="nx">pushEndpoint</span> <span class="o">===</span> <span class="nx">emailEndpoint</span><span class="p">)</span> <span class="p">{</span>
- <span class="nx">emailHandler</span><span class="p">(</span><span class="nx">e</span><span class="p">.</span><span class="nx">version</span><span class="p">);</span>
- <span class="p">}</span> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="nx">e</span><span class="p">.</span><span class="nx">pushEndpoint</span> <span class="o">===</span> <span class="nx">imEndpoint</span><span class="p">)</span> <span class="p">{</span>
- <span class="nx">imHandler</span><span class="p">(</span><span class="nx">e</span><span class="p">.</span><span class="nx">version</span><span class="p">);</span>
- <span class="p">}</span>
- <span class="p">});</span>
-<span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
- <span class="c1">// No message handler</span>
-<span class="p">}</span></pre>
-<h3 id="新增_push-register_訊息處理器">新增 <code>push-register</code> 訊息處理器</h3>
-<div class="note">
- <p>請確實添增此處理器,並檢查是否正常運作。只要在產生 <code>push-register </code>訊息當下,你並未重新註冊自己的終端,則之後將<strong>無法</strong>繼續接收其他推播通知。</p>
-</div>
-<p>一旦裝置變更了自己的 UAID (可能是因為推播伺服器變更,或當機之後需恢復作業,或其他更多情形),就會將 <code>push-register</code> 訊息傳送至所有 App。也就是說,因為你之前的終端均已無效,所以你<strong>必須</strong>再次重新註冊所有的終端。</p>
-<pre><span class="k">if</span> <span class="p">(</span><span class="nb">window</span><span class="p">.</span><span class="nx">navigator</span><span class="p">.</span><span class="nx">mozSetMessageHandler</span><span class="p">)</span> <span class="p">{</span>
- <span class="nb">window</span><span class="p">.</span><span class="nx">navigator</span><span class="p">.</span><span class="nx">mozSetMessageHandler</span><span class="p">(</span><span class="s1">'push-register'</span><span class="p">,</span> <span class="kd">function</span><span class="p">(</span><span class="nx">e</span><span class="p">)</span> <span class="p">{</span>
- console.log<span class="p">(</span><span class="s1">'push-register received, I need to register my endpoint(s) again!'</span><span class="p">);</span>
-
-<span class="c1"> <span class="kd">var</span> <span class="nx">req</span> <span class="o">=</span> <span class="nx">navigator</span><span class="p">.</span><span class="nx">push</span><span class="p">.</span><span class="nx">register</span><span class="p">();</span>
- <span class="nx"> req</span><span class="p">.</span><span class="brush: js">onsuccess</span> <span class="o">=</span> <span class="kd">function</span><span class="p">(</span><span class="nx">e</span><span class="p">)</span> <span class="p">{</span>
- <span class="kd"> var</span> <span class="nx">endpoint</span> <span class="o">=</span> <span class="nx">req</span><span class="p">.</span><span class="nx">result</span><span class="p">;</span>
- console.log<span class="p">(</span><span class="s2">"New endpoint: "</span> <span class="o">+</span> <span class="nx">endpoint</span> <span class="p">);
- localStorage.endpoint = endpoint;</span>
- <span class="p">}</span>
-
- <span class="nx"> req</span><span class="p">.</span><span class="nx">onerror</span> <span class="o">=</span> <span class="kd">function</span><span class="p">(</span><span class="nx">e</span><span class="p">)</span> <span class="p">{</span>
- console.error<span class="p">(</span><span class="s2">"Error getting a new endpoint: "</span> <span class="o">+</span> <span class="nx">JSON</span><span class="p">.</span><span class="nx">stringify</span><span class="p">(</span><span class="nx">e</span><span class="p">));</span>
- <span class="p"> }</span></span>
- <span class="p">});</span>
-<span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
- <span class="c1">// No message handler</span>
-<span class="p">}</span></pre>
-<h3 id="傳送通知">傳送通知</h3>
-<p>一旦你的伺服器擁有 <code>endpoint</code> 之後,「傳送通知」就如同「將 <code>HTTP PUT</code> 的請求 (其內容具備 <code>version=&lt;version&gt;</code><code>) </code>傳送至終端」一樣簡單。先假想某個終端具備下列網址:</p>
-<p><code>https://push.src.openwebdevice.com/v1/notify/abcdef01234567890abcdefabcdef01234567890abcdef</code></p>
-<p>而且是版本 5:</p>
-<p><code>version=5</code></p>
-<p>搭配 curl:</p>
-<p><code>curl -X PUT -d "version=5" https://push.src.openwebdevice.com/v1/notify/abcdef01234567890abcdefabcdef01234567890abcdef</code></p>
-<p>如果伺服器正確運作,所取得的反應內容就會包含 <code>200 Status (OK)</code> 與 <code>{}</code> 各 1 組作為內容 (Body)。如果發生錯誤,則會送出有效的 JSON 以解釋該錯誤。</p>
-<p>另請注意,版號應該為逐漸遞增的整數。如果新版本的版號,小於裝置/伺服器上已儲存的版本,則 App <strong>不會</strong>獲得新的通知。</p>
-<h2 id="規格">規格</h2>
-<p>{{page("/en-US/docs/Web/API/PushManager","Specifications")}}</p>
-<h2 id="瀏覽器相容性">瀏覽器相容性</h2>
-<p>{{page("/en-US/docs/Web/API/PushManager","Browser_compatibility")}}</p>
-<h2 id="另可參閱">另可參閱</h2>
-<ul>
- <li>{{domxref("PushManager")}}</li>
- <li>{{domxref("window.navigator.push","navigator.push")}}</li>
- <li><a href="https://github.com/frsela/pushJSlibrary" title="https://github.com/frsela/pushJSlibrary">pushJSLibrary, a push shim for browsers that do not implement the API</a></li>
-</ul>
diff --git a/files/zh-tw/webapi/tcp_socket/index.html b/files/zh-tw/webapi/tcp_socket/index.html
deleted file mode 100644
index ae0c75e434..0000000000
--- a/files/zh-tw/webapi/tcp_socket/index.html
+++ /dev/null
@@ -1,69 +0,0 @@
----
-title: TCP Socket
-slug: WebAPI/TCP_Socket
-translation_of: Archive/B2G_OS/API/TPC_Socket_API
----
-<p>{{ non-standard_header() }}</p>
-<p>{{ B2GOnlyHeader2('privileged') }}</p>
-<h2 id="摘要">摘要</h2>
-<p>TCPSocket API 可開啟並使用 TCP 連線,亦可讓 Apps 開發者基於 TCP 架構,建構相關通訊協定 (如 IMAP、IRC、POP、HTTP等);甚至建立自己所需的協定以滿足特殊需求。</p>
-<h2 id="概述">概述</h2>
-<p>透過 <a href="https://developer.mozilla.org/en-US/docs/Web/API/window.navigator.mozTCPSocket" title="Returns a TCPSocket object you can use to open other sockets."><code>navigator.mozTCPSocket</code></a> 屬性 (本身為 <a href="https://developer.mozilla.org/en-US/docs/Web/API/TCPSocket" title="Provides access to a raw TCP socket API in JavaScript."><code>TCPSocket</code></a> 物件) 即可存取此 API。</p>
-<h3 id="開啟_Socket">開啟 Socket</h3>
-<p><a href="https://developer.mozilla.org/en-US/docs/Web/API/TCPSocket.open" title="The open method is used to open a TCP connection to a given server on a given port."><code>TCPSocket.open()</code></a> 函式即可開啟 Socket。該函式共有 3 組參數:</p>
-<ol>
- <li>以 1 組字串代表所要連線的伺服器主機名稱 (亦可為該伺服器的原始 IP 位址)。</li>
- <li>以 1 組數字代表 Socket 所要使用的 TCP 通訊埠 (某些協定擁有標準埠,如 HTTP 為 80、SSL 為 447、SMTP 為 25 等。若為 1024 以上的通訊埠數字,則不會用於任何特定的通訊協定,也就是說可用於任何用途)。</li>
- <li>最後是 1 組選填的物件,內含最多 2 個選項。<br>
- i.) 名為 <code>useSSL</code> 的 Boolean 值,代表 Socket 必須使用 SSL,預設值為 <code>false。</code><br>
- ii.) 名為 <code>binaryType</code> 的字串,可指定 Apps 透過 <a href="https://developer.mozilla.org/en-US/docs/Web/Reference/Events/data" title="/en-US/docs/Web/Reference/Events/data">data</a> 事件所取得的資料型態,可為 <code>string</code> 或 <code>arraybuffer</code> 值。預設值為 <code>string</code>。</li>
-</ol>
-<pre class="brush: js">var socket = navigator.mozTCPSocket.open('localhost', 80);</pre>
-<div class="note">
- <p><strong>注意:</strong>僅限 Certified Apps 可使用 1024 以下的通訊埠。</p>
-</div>
-<h3 id="傳送資料">傳送資料</h3>
-<p><a href="https://developer.mozilla.org/en-US/docs/Web/API/TCPSocket.send" title="The send method is used to buffer data to be sent to the server."><code>TCPSocket.send()</code></a> 函式將透過 1 組字串,或 1 組 <a href="https://developer.mozilla.org/en-US/docs/JavaScript/Typed_arrays/Uint8Array" title="/en-US/docs/JavaScript/Typed_arrays/Uint8Array">Uint8Array</a> 物件而傳送資料。另請注意,由於 TCP Socket 僅處理二進制資料,因此使用 <a href="https://developer.mozilla.org/en-US/docs/JavaScript/Typed_arrays/Uint8Array" title="/en-US/docs/JavaScript/Typed_arrays/Uint8Array">Uint8Array</a> 可達較高的安全性。</p>
-<p>對 TCP 通訊協定而言,單次傳輸量最好以 64kb 為上限而能達到最佳效果。只要緩衝的資料不到 64kb,送至 <a href="https://developer.mozilla.org/en-US/docs/Web/API/TCPSocket.send" title="The send method is used to buffer data to be sent to the server."><code>send</code></a> 函式的呼叫即會回傳 <code>true。一旦緩衝區滿載</code>,則函式隨即回傳 <code>false</code>,進而要求該 App 暫停並清空緩衝區。每次只要清空緩衝區就會發出 <a href="https://developer.mozilla.org/en-US/docs/Web/Reference/Events/drain" title="/en-US/docs/Web/Reference/Events/drain">drain</a> 事件,讓該 App 針對此事件再度開始傳送資料。</p>
-<p>透過 <a href="https://developer.mozilla.org/en-US/docs/Web/API/TCPSocket.bufferedAmount" title="The bufferedAmount represents the number of bytes which have previously been buffered by calls to the send() method on this socket."><code>TCPSocket.bufferedAmount</code></a> 屬性,即可得知目前已緩衝的實際資料量。</p>
-<pre class="brush: js">function getData() {
- var data;
-
- // do stuff that will retrieve data
-
- return data;
-}
-
-function pushData() {
- var data;
-
- do {
- data = getData();
- } while (data != null &amp;&amp; socket.send(data));
-}
-
-// Each time the buffer is flushed
-// we try to send data again.
-socket.ondrain = pushData;
-
-// Start sending data.
-pushData();
-</pre>
-<h3 id="取得資料">取得資料</h3>
-<p>只要 Socket 獲得主機所傳來的資料,就會發出 <a href="https://developer.mozilla.org/en-US/docs/Web/Reference/Events/data" title="/en-US/docs/Web/Reference/Events/data">data</a> 事件。App 可透過此事件而存取來自於 Socket 的資料。當 Socket 為開啟狀態時,則資料型態將根據已設定的選項而有所不同 (可參閱前述的第三種參數)。</p>
-<pre class="brush: js">socket.ondata = function (event) {
- if (typeof event.data === 'string') {
- console.log('Get a string: ' + event.data);
- } else {
- console.log('Get a Uint8Array');
- }
-}</pre>
-<p>在送出所需的 <a href="https://developer.mozilla.org/en-US/docs/Web/Reference/Events/data" title="/en-US/docs/Web/Reference/Events/data">data</a> 事件之後,有時也必須暫停後續資料流入。此時呼叫 <a href="https://developer.mozilla.org/en-US/docs/Web/API/TCPSocket.suspend" title="The suspend method pauses reading incoming data and prevents the data event from being triggered until the resume() method is called."><code>TCPSocket.suspend()</code></a> 函式,即可暫停讀取後續資料並停止發送 <a href="https://developer.mozilla.org/en-US/docs/Web/Reference/Events/data" title="/en-US/docs/Web/Reference/Events/data">data</a>。若要再次開始讀取資料並發送事件,則可呼叫 <a href="https://developer.mozilla.org/en-US/docs/Web/API/TCPSocket.resume" title="The resume method resumes reading incoming data and allows the data event to be triggered again."><code>TCPSocket.resume()</code></a> 函式。</p>
-<h3 id="關閉_Socket">關閉 Socket</h3>
-<p><a href="https://developer.mozilla.org/en-US/docs/Web/API/TCPSocket.close" title="The close method cleanly closes the connection."><code>TCPSocket.close()</code></a> 可關閉 Socket。</p>
-<h2 id="標準">標準</h2>
-<p>尚未有任何規格。若要進一步了解此 API,可至 W3C 的 <a href="http://www.w3.org/2012/sysapps/raw-sockets/" title="http://www.w3.org/2012/sysapps/raw-sockets/">Raw Sockets</a> 提案之下,參閱 <a href="http://www.w3.org/2012/sysapps/" title="http://www.w3.org/2012/sysapps/">System Applications Working Group</a> 的相關討論。</p>
-<h2 id="另可參閱">另可參閱</h2>
-<ul>
- <li>{{domxref("TCPSocket")}}</li>
-</ul>
diff --git a/files/zh-tw/webapi/time_and_clock/index.html b/files/zh-tw/webapi/time_and_clock/index.html
deleted file mode 100644
index aa772cf083..0000000000
--- a/files/zh-tw/webapi/time_and_clock/index.html
+++ /dev/null
@@ -1,30 +0,0 @@
----
-title: Time and Clock API
-slug: WebAPI/Time_and_Clock
-translation_of: Archive/B2G_OS/API/Time_and_Clock_API
----
-<p>{{ non-standard_header() }}</p>
-<p>{{ B2GOnlyHeader2('certified') }}</p>
-<h2 id="摘要">摘要</h2>
-<p>Time/Clock API 可輕鬆更改系統的時間。</p>
-<h2 id="概述">概述</h2>
-<p>此 API 可被存取,且回傳的物件可揭露單一函式。</p>
-<p>而該函式可用以實際更改系統時間,並接受某個數字或 <a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date" title="/en-US/docs/JavaScript/Reference/Global_Objects/Date">Date</a> 物件作為參數。在提供了數字之後,就會開始 1970 年 1 月 1 日 (UTC 時區) 起算的時間,並以毫秒 (Millisecond) 計算。</p>
-<p>每次只要更改了時間,就會啟動事件。而只要透過函式 (使用 <a href="https://developer.mozilla.org/en-US/docs/Web/Reference/Events/moztimechange" title="/en-US/docs/Web/Reference/Events/moztimechange">moztimechange</a> 事件名稱),或將事件處理器 (Event Handler) 附加至屬性,即可在 <code>window</code> 物件層級擷取到該事件。</p>
-<div class="note">
- <p><strong>注意:</strong>如果你要更改自己裝置的時區,就必須使用 <a href="https://developer.mozilla.org/en-US/docs/WebAPI/Settings" title="https://developer.mozilla.org/en-US/docs/WebAPI/Settings">Settings API</a>。</p>
-</div>
-<h2 id="範例">範例</h2>
-<pre class="brush: js">function setTime(time) {
- navigator.mozTime.set(time);
-}
-
-window.addEventListener('moztimechange', function () {
- console.log('Time has changed');
-});
-
-setTime(new Date());
-
-</pre>
-<h2 id="規格">規格</h2>
-<p>不屬於任何規格</p>
diff --git a/files/zh-tw/webapi/web_activities/index.html b/files/zh-tw/webapi/web_activities/index.html
deleted file mode 100644
index 6c71c46bd8..0000000000
--- a/files/zh-tw/webapi/web_activities/index.html
+++ /dev/null
@@ -1,415 +0,0 @@
----
-title: Web Activities
-slug: WebAPI/Web_Activities
-translation_of: Archive/B2G_OS/API/Web_Activities
----
-<p>{{ non-standard_header() }}</p>
-<p>{{B2GOnlyHeader2('installed')}}</p>
-<h2 id="摘要">摘要</h2>
-<p>Web Activities 即定義「App 將 Activity 委託 (Delegate) 予另一個 App (往往是由使用者所選擇)」的方法。</p>
-<p>Web Activities 目前僅能用於 Firefox OS 上,而完整規格可<a href="https://wiki.mozilla.org/WebAPI/WebActivities" title="https://wiki.mozilla.org/WebAPI/WebActivities">參閱 WikiMo</a>。</p>
-<h2 id="Activity">Activity</h2>
-<p>所謂「Activity」就是使用者想做的事情,如選取影像、傳送電子郵件等。App 開發者可能會定義某個 App 去處理該 Activity,或定義某個 App 委託予 Activity。</p>
-<h2 id="將_App_註冊為_Activity_handler">將 App 註冊為 Activity handler</h2>
-<p>App 開發者可建構 App 以處理單或多個 Activity。也就是說,這個 App 可經由其他 App 呼叫之後,而執行 Activity 所定義的某些特定動作。舉例來說,我們可能用其他 App 呼叫相片管理 App,進而選取相片。若 App 是作為 Activity Handler,就會成為其他 App 作業流程的一部分。</p>
-<h3 id="註冊_Activity">註冊 Activity</h3>
-<p>如果要將 App 註冊為 Activity Handler,目前唯一方法就是到 App 的 manifest 檔案中宣告。</p>
-<div class="note">
- <p><strong>注意:</strong>任何 App 均可針對現有的 Activity,將本身註冊為 Activity Handler;亦可建立自己的 Activity。不論是哪種情況,對 manifest 檔案的處理方式都相同。但若要建立新的 Activity,最好是在新 Activity 名稱的前方加上網址 (例如 <em>example.org/myActivity </em>或 <em>org.example.myActivity</em>),以避免發生衝突。</p>
-</div>
-<h4 id="App_manifest_(亦所謂的宣告註冊)">App manifest (亦所謂的宣告註冊)</h4>
-<p>如同下列範例所示,必須透過 <a href="https://developer.mozilla.org/en-US/docs/Apps/Manifest" title="/en-US/docs/Apps/Manifest">App 的 manifest 檔案</a>,宣告 App 將會處理 Activity:</p>
-<pre class="brush: js">{
- // Other App Manifest related stuff
-
- // Activity registration
- "activities": {
-
- // The name of the activity to handle (here "pick")
- "pick": {
- "href": "./pick.html",
- "disposition": "inline",
- "filters": {
- "type": ["image/*","image/jpeg","image/png"]
- },
- "returnValue": true
- }
- }
-}
-</pre>
-<h4 id="動態註冊">動態註冊</h4>
-<p>透過 <a href="https://developer.mozilla.org/en-US/docs/Web/API/window.navigator" title="/en-US/docs/Web/API/window.navigator"><code>navigator</code></a> 物件,即可讓 App 動態的註冊自己。但目前尚未提供此 API。可留意 <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=775181">bug 775181</a> 以持續追蹤此 API。</p>
-<h4 id="Activity_Handler_說明">Activity Handler 說明</h4>
-<dl>
- <dt>
- <code>href</code></dt>
- <dd>
- 當其他 App 或網頁所啟動的 Activity,同樣也受到此 App 所支援時,則只要選定此 App 執行 Activity,則 <code>href 將指定所應開啟的網頁。另可透過 disposition</code> 屬性指定網頁的開啟方式。
- <div class="note">
- <strong>注意:</strong>此頁面的 URL 將受到<a href="https://developer.mozilla.org/en-US/docs/JavaScript/Same_origin_policy_for_JavaScript" title="/en-US/docs/JavaScript/Same_origin_policy_for_JavaScript">同源規範 (Same-origin policy)</a> 的限制。</div>
- </dd>
-</dl>
-<dl>
- <dt>
- <code>disposition</code> {{optional_inline()}}</dt>
-</dl>
-<dl>
- <dd>
- 在開始 Activity 時,指定「<code>href</code> 所指定的頁面」呈現方式。其值必為下列之一 (若略過不設定,則預設為 <code>window</code>):
- <ul>
- <li><strong><code>window</code></strong> ─ 只要是處理 Activity 的頁面,均將以新視窗開啟之;若在行動裝置上,則是以此畫面取代「請求該 Activity 的原始 App」。頁面必須針對自己所支援的各個 Activity,呼叫 <a href="https://developer.mozilla.org/en-US/docs/Web/API/window.navigator.mozSetMessageHandler" title="/en-US/docs/Web/API/window.navigator.mozSetMessageHandler"><code>navigator.mozSetMessageHandler()</code></a>,再執行「接收到訊息」的Activity。</li>
- <li><strong><code>inline</code></strong> ─ 將以覆蓋原頁面的方式,開啟「處理 Activity 的頁面」;若在行動裝置上,則會在「請求該 Activity 的原始 App」上彈出框。如果 <code>disposition</code> 同樣是 <code>window</code>,則後續動作將一模一樣。</li>
- </ul>
- </dd>
-</dl>
-<dl>
- <dt>
- <code>returnValue</code> {{optional_inline()}}</dt>
- <dd>
- 表示 Activity 是否將回傳數值。如果 App 不回傳數值,則一旦選定 App,UA 隨即傳送
- <i>
- success</i>
- 事件。如果要回傳數值,那只要 Activity 成功,Activity Handler 會呼叫 <a href="https://developer.mozilla.org/en-US/docs/Web/API/MozActivityRequestHandler.postResult" title="/en-US/docs/Web/API/MozActivityRequestHandler.postResult"><code>MozActivityRequestHandler.postResult()</code></a>;反之則呼叫 <a href="https://developer.mozilla.org/en-US/docs/Web/API/MozActivityRequestHandler.postError" title="/en-US/docs/Web/API/MozActivityRequestHandler.postError"><code>MozActivityRequestHandler.postError()</code></a>。此處 Activity Handler 中,將於 <a href="https://developer.mozilla.org/en-US/docs/Web/API/window.navigator.mozSetMessageHandler" title="/en-US/docs/Web/API/window.navigator.mozSetMessageHandler"><code>mozSetMessageHandler</code></a> 指定第一引數的類型,其實就是 <a href="https://developer.mozilla.org/en-US/docs/Web/API/MozActivityRequestHandler" title="/en-US/docs/Web/API/MozActivityRequestHandler"><code>MozActivityRequestHandler</code></a>。在事件處理器呼叫了 <a href="https://developer.mozilla.org/en-US/docs/Web/API/MozActivityRequestHandler.postResult" title="/en-US/docs/Web/API/MozActivityRequestHandler.postResult"><code>postResult</code></a> 或 <a href="https://developer.mozilla.org/en-US/docs/Web/API/MozActivityRequestHandler.postError" title="/en-US/docs/Web/API/MozActivityRequestHandler.postError"><code>postError</code></a> 之後,將分別觸發 <em>success</em> 或 <em>error</em> 事件。</dd>
-</dl>
-<dl>
- <dt>
- <code>filters</code> {{optional_inline()}}</dt>
- <dd>
- 此 Dictionary 收錄了「用以指定篩選器 (Filter)」的各個屬性。在確認 App 是否適合處理目前 Activity 時,就會套用這些篩選器。篩選器名稱可為任何形式的文字,但需對應 <a href="https://developer.mozilla.org/en-US/docs/Web/API/MozActivityOptions" title="/en-US/docs/Web/API/MozActivityOptions"><code>MozActivityOptions</code></a> 的 <a href="https://developer.mozilla.org/en-US/docs/Web/API/MozActivityOptions.data" title="/en-US/docs/Web/API/MozActivityOptions.data"><code>data</code></a> 屬性名稱。篩選器的值可能為基本數值 (數字或字串)、基本數值構成的陣列,或篩選器的定義物件。任一 Activity 必須先滿足所有篩選器之後,才會決定是否要處理其他 Activity。</dd>
-</dl>
-<p>根據各個篩選器數值的不同,處理篩選器的方式也有所差異:</p>
-<ul>
- <li>如果篩選器為基本數值,則可選填相對應的 <a href="https://developer.mozilla.org/en-US/docs/Web/API/MozActivityOptions.data" title="/en-US/docs/Web/API/MozActivityOptions.data"><code>MozActivityOptions.data</code></a> 屬性。但若屬性已存在,則必須與篩選器所具備的數值相同。</li>
- <li>如果篩選器數值為基本數值構成的陣列,則可選填相對應的 <a href="https://developer.mozilla.org/en-US/docs/Web/API/MozActivityOptions.data" title="/en-US/docs/Web/API/MozActivityOptions.data"><code>MozActivityOptions.data</code></a> 屬性。但若屬性已存在,則必須與篩選器所具備的數值陣列之一相同。</li>
- <li>如果篩選器數值為篩選器定義物件,則相對應的 <a href="https://developer.mozilla.org/en-US/docs/Web/API/MozActivityOptions.data" title="/en-US/docs/Web/API/MozActivityOptions.data"><code>MozActivityOptions.data</code></a> 屬性只要遵守物件所定義的規範,即可滿足篩選器。篩選器定義物件可為下列屬性:
- <ul>
- <li><code>required</code>:此 Boolean 值將指出對應的 <a href="https://developer.mozilla.org/en-US/docs/Web/API/MozActivityOptions.data" title="/en-US/docs/Web/API/MozActivityOptions.data"><code>MozActivityOptions.data</code></a> 屬性,必為存在 (<code>true</code>) 或不存在 (<code>false</code>)。</li>
- <li><code>value</code>: <code>:基本數值或基本數值構成的陣列。相對應的</code> <a href="https://developer.mozilla.org/en-US/docs/Web/API/MozActivityOptions.data" title="/en-US/docs/Web/API/MozActivityOptions.data"><code>MozActivityOptions.data</code></a> 屬性值,必須與篩選器中定義的數值之一相同。</li>
- <li><code>min</code><code>:如果所需的數值為數字,則相對應的 </code><a href="https://developer.mozilla.org/en-US/docs/Web/API/MozActivityOptions.data" title="/en-US/docs/Web/API/MozActivityOptions.data"><code>MozActivityOptions.data</code></a> 屬性值必須大於或等於該值。</li>
- <li><code>max</code><code>:如果所需的數值為數字,則相對應的 </code><a href="https://developer.mozilla.org/en-US/docs/Web/API/MozActivityOptions.data" title="/en-US/docs/Web/API/MozActivityOptions.data"><code>MozActivityOptions.data</code></a> 屬性值必須小於或等於該值。</li>
- <li><code>pattern</code><code>:</code><code>字串形式必須遵照</code> <a href="https://developer.mozilla.org/en-US/docs/JavaScript/Guide/Regular_Expressions" title="/en-US/docs/JavaScript/Guide/Regular_Expressions">JavaScript 正規表示式 (Regular expression)</a> 語法。相對應的 <a href="https://developer.mozilla.org/en-US/docs/Web/API/MozActivityOptions.data" title="/en-US/docs/Web/API/MozActivityOptions.data"><code>MozActivityOptions.data</code></a> 屬性值必須符合該形式。<strong>從</strong><strong> Firefox OS v1.2 </strong><strong>起即支援此屬性</strong><strong>。</strong></li>
- <li><code>patternFlag</code>:若使用了 <code>pattern</code> 屬性,則必須透過此屬性提供某些額外的正規表示式旗標 (如 <code>i</code> 或 <code>g</code>)。<strong>從</strong><strong> Firefox OS v1.2 </strong><strong>起即支援此屬性</strong><strong>。</strong></li>
- <li><code>regexp</code>:此字串包含的正規表示式內容,均遵循 <a href="https://developer.mozilla.org/en-US/docs/JavaScript/Guide/Regular_Expressions" title="/en-US/docs/JavaScript/Guide/Regular_Expressions">JavaScript 正規表示式</a>的語法。其對應的 <a href="https://developer.mozilla.org/en-US/docs/Web/API/MozActivityOptions.data" title="The data property returns an arbitrary object representing any data passed with the activity."><code>MozActivityOptions.data</code></a> 屬性值必須符合該樣式。與上方的 <code>pattern 欄位</code>相較,<code>regexp可以只針對字串中間的部分值做比對</code>;因此若要比對字串頭與字串尾,就必須使用 metacharacters 的「^」與「$」分別,即可與 <code>patternFlag </code>一樣進行完全比對。<strong>目前僅限</strong><strong> Firefox OS v1.0 </strong><strong>與</strong><strong> v1.1 </strong><strong>支援此屬性。</strong>因此建議同時使用 <code>pattern</code> 與 <code>regexp</code>。</li>
- </ul>
- </li>
-</ul>
-<h2 id="處理_Activity">處理 Activity</h2>
-<p>一旦把 App 宣告為 Activity Handler 之後,我們就必須在實作中處理其他 App 所傳來的 Activity 請求。</p>
-<p>若要處理 Activity,就必須註冊「執行所有必要動作」的函式。先透過 <a href="https://developer.mozilla.org/en-US/docs/Web/API/window.navigator.mozSetMessageHandler" title="/en-US/docs/Web/API/window.navigator.mozSetMessageHandler"><code>navigator.mozSetMessageHandler()</code></a> 來設定訊息處理器 (Message handler),並特別指派至「<code>activity」訊息</code> (不能為 Activity 的名稱)。接著將傳入 <a href="https://developer.mozilla.org/en-US/docs/Web/API/MozActivityRequestHandler" title="/en-US/docs/Web/API/MozActivityRequestHandler"><code>MozActivityRequestHandler</code></a> 物件,以作為 Activity Handler 函式的參數。</p>
-<pre class="brush: js">navigator.mozSetMessageHandler('activity', function(activityRequest) {
- // Do something to handle the activity
-});</pre>
-<p>在 Activity Handler 函式執行動作時,將透過 Activity 請求而檢索 Activity 的相關資訊,並依需要而回傳答案。</p>
-<p>另外,呼叫 Activity 的 App 必須提供某些資料 (請參閱下表)。而透過請求的 <a href="https://developer.mozilla.org/en-US/docs/Web/API/MozActivityRequestHandler.source" title="/en-US/docs/Web/API/MozActivityRequestHandler.source">source</a> 屬性 (亦為 <a href="https://developer.mozilla.org/en-US/docs/Web/API/MozActivityOptions" title="/en-US/docs/Web/API/MozActivityOptions">MozActivityOptions</a> 物件) 即可取得這些資料。該物件將提供 Activity 呼叫的 <a href="https://developer.mozilla.org/en-US/docs/Web/API/MozActivityOptions.name" title="/en-US/docs/Web/API/MozActivityOptions.name">name</a> 與相關 <a href="https://developer.mozilla.org/en-US/docs/Web/API/MozActivityOptions.data" title="/en-US/docs/Web/API/MozActivityOptions.data">data</a>。</p>
-<pre class="brush: js">navigator.mozSetMessageHandler('activity', function(activityRequest) {
- var option = activityRequest.source;
-
- if (option.name === "pick") {
- // Do something to handle the activity
- }
-});</pre>
-<p>一旦執行所有動作以處理 Activity 之後,我們就可以呼叫請求的 <a href="https://developer.mozilla.org/en-US/docs/Web/API/MozActivityRequestHandler.postResult" title="/en-US/docs/Web/API/MozActivityRequestHandler.postResult">postResult()</a> 函式,針對委託該 Activity 的 App,回傳所需的結果。</p>
-<p>如果發生錯誤,則可呼叫請求的 <a href="https://developer.mozilla.org/en-US/docs/Web/API/MozActivityRequestHandler.postError" title="/en-US/docs/Web/API/MozActivityRequestHandler.postError">postError()</a> 函式,以回傳該 Activity 的錯誤訊息。</p>
-<pre class="brush: js">navigator.mozSetMessageHandler('activity', function(activityRequest) {
- var option = activityRequest.source;
-
- if (option.name === "pick") {
- // Do something to handle the activity
- ...
-
- // Send back the result
- if (picture) {
- activityRequest.postResult(picture);
- } else {
- activityRequest.postError("Unable to provide a picture");
- }
- }
-});</pre>
-<div class="note">
- <p><strong>注意:</strong>如果並未呼叫 <a href="https://developer.mozilla.org/en-US/docs/Web/API/MozActivityRequestHandler.postError" title="/en-US/docs/Web/API/MozActivityRequestHandler.postError"><code>postError</code></a> 或 <a href="https://developer.mozilla.org/en-US/docs/Web/API/MozActivityRequestHandler.postResult" title="/en-US/docs/Web/API/MozActivityRequestHandler.postResult"><code>postResult()</code></a>,則均應由 UA 送出錯誤訊息;例如使用者離開了 App (關閉桌面上的分頁,或回到行動裝置的首頁) 的情形。</p>
-</div>
-<h2 id="開始_Activity">開始 Activity</h2>
-<p>就 <em>Web Activities</em> 的另一方面來說,就是有 App 會將 Activity 委託予我們的 App。若要執行這種委託作業,則 App 必須建立 (Instantiate) <a href="https://developer.mozilla.org/en-US/docs/Web/API/MozActivity" title="/en-US/docs/Web/API/MozActivity"><code>MozActivity</code></a> 物件,進而呼叫 Activity。這種物件其實就是 <a href="https://developer.mozilla.org/en-US/docs/Web/API/DOMRequest" title="/en-US/docs/Web/API/DOMRequest"><code>DOMRequest</code></a> 物件,可等待來自於 Activity Handler 的任何反應。只要建立了物件之後,就會開始 Activity (也會立刻為使用者顯示 UI)。</p>
-<pre class="brush: js" id=".C2.A0">var activity = new MozActivity({
- // Ask for the "pick" activity
- name: "pick",
-
- // Provide de data required by the filters of the activity
- data: {
- type: "image/jpeg"
- }
-});
-
-activity.onsuccess = function() {
- var picture = this.result;
- console.log("A picture has been retrieve");
-};
-
-activity.onerror = function() {
- console.log(this.error);
-};
-</pre>
-<h3 id="Firefox_OS_的_Activity">Firefox OS 的 Activity</h3>
-<p><a href="/en-US/docs/Mozilla/Firefox_OS/Platform/Gaia" title="/en-US/docs/Mozilla/Firefox_OS/Platform/Gaia">Gaia</a> 即為 Firefox OS 的原生介面,並已內建許多 App 以定義基本的 Activity。這些 Activity 如下:</p>
-<table class="standard-table">
- <thead>
- <tr>
- <th scope="col">Name</th>
- <th scope="col">Application</th>
- <th scope="col">Expected Data (filters)</th>
- <th scope="col">Comments</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><code>browse</code></td>
- <td>Gallery</td>
- <td>
- <pre class="brush: js">
-type: "photos"</pre>
- </td>
- <td> </td>
- </tr>
- <tr>
- <td><code>configure</code></td>
- <td>Settings</td>
- <td>
- <pre class="brush: js">
-target: "device"</pre>
- </td>
- <td> </td>
- </tr>
- <tr>
- <td><code>costcontrol/balance</code></td>
- <td>Costcontrol</td>
- <td>None</td>
- <td> </td>
- </tr>
- <tr>
- <td><code>costcontrol/data_usage</code></td>
- <td>Costcontrol</td>
- <td>None</td>
- <td> </td>
- </tr>
- <tr>
- <td><code>costcontrol/telephony</code></td>
- <td>Costcontrol</td>
- <td>None</td>
- <td> </td>
- </tr>
- <tr>
- <td><code>dial</code></td>
- <td>Communication</td>
- <td>
- <pre class="brush: js">
-type: "webtelephony/number",
-number: {
- regexp:/^[\\d\\s+#*().-]{0,50}$/
-}</pre>
- </td>
- <td>當 App 要傳送一通電話時使用。</td>
- </tr>
- <tr>
- <td colspan="1" rowspan="3"><code>new</code></td>
- <td>Communication</td>
- <td>
- <pre class="brush: js">
-type: "webcontacts/contact"</pre>
- </td>
- <td>當 App 要建立新的聯絡人資料時使用。</td>
- </tr>
- <tr>
- <td>Email</td>
- <td>
- <pre class="brush: js">
-type: "mail"</pre>
- </td>
- <td> </td>
- </tr>
- <tr>
- <td>SMS</td>
- <td>
- <pre class="brush: js" id="LC48">
-type: "websms/sms",
-number: {
- regexp:/^[\\w\\s+#*().-]{0,50}$/
-}</pre>
- </td>
- <td>當 App 要傳送一封文字簡訊時使用。</td>
- </tr>
- <tr>
- <td colspan="1" rowspan="4"><code>open</code></td>
- <td>Communication</td>
- <td>
- <pre class="brush: js">
-type: "webcontacts/contact"</pre>
- </td>
- <td> </td>
- </tr>
- <tr>
- <td>Gallery</td>
- <td>
- <pre class="brush: js">
-type: [
- "image/jpeg",
- "image/png",
- "image/gif",
- "image/bmp"
-]</pre>
- </td>
- <td> </td>
- </tr>
- <tr>
- <td>Music</td>
- <td>
- <pre class="brush: js">
-type: [
- "audio/mpeg",
- "audio/ogg",
- "audio/mp4"
-]</pre>
- </td>
- <td> </td>
- </tr>
- <tr>
- <td>Video</td>
- <td>
- <pre class="brush: js">
-type: [
- "video/webm",
- "video/mp4",
- "video/3gpp",
- "video/youtube"
-]</pre>
- <p>Also expect a <code>blob</code> property which is a {{domxref("Blob")}} object.</p>
- </td>
- <td>當 App 要顯示影片時使用 (而 <code>view</code> 的Activity 同樣可辦到) 。</td>
- </tr>
- <tr>
- <td colspan="1" rowspan="2"><code>pick</code></td>
- <td>Camera, Gallery, Wallpaper</td>
- <td>
- <pre class="brush: js">
-type: ["image/*", "image/jpeg"]</pre>
- </td>
- <td>當 App 要取得圖片時使用。</td>
- </tr>
- <tr>
- <td>Communication</td>
- <td>
- <pre class="brush: js">
-type: [
- "webcontacts/contact",
- "webcontacts/email"
-]</pre>
- </td>
- <td>當 App 要檢索某個聯絡人資訊或電子郵件時使用。</td>
- </tr>
- <tr>
- <td><code>record</code></td>
- <td>Camera</td>
- <td>
- <pre class="brush: js">
-type: ["photos", "videos"]</pre>
- </td>
- <td>當 App 要錄製影片時使用。</td>
- </tr>
- <tr>
- <td><code>save-bookmark</code></td>
- <td>Homescreen</td>
- <td>
- <pre class="brush: js" id="LC46">
-type: "url",
-url: {
- required:true,
- regexp:/^https?:/
-}</pre>
- </td>
- <td> </td>
- </tr>
- <tr>
- <td colspan="1" rowspan="2"><code>share</code></td>
- <td>Bluetooth</td>
- <td>
- <pre class="brush: js">
-number: 1
-</pre>
- </td>
- <td> </td>
- </tr>
- <tr>
- <td>Email, Wallpaper</td>
- <td>
- <pre class="brush: js">
-type: "image/*"</pre>
- </td>
- <td>當 App 要分享圖片時使用。</td>
- </tr>
- <tr>
- <td colspan="1" rowspan="4"><code>view</code></td>
- <td>Browser</td>
- <td>
- <pre class="brush: js">
-type: "url"
-url: {
- required: true,
- regexp: /^https?:.{1,16384}$/
-}</pre>
- </td>
- <td>當 App 要開啟 URL 時使用。</td>
- </tr>
- <tr>
- <td>Email</td>
- <td>
- <pre class="brush: js" id="LC64">
-type: "url",
-url: {
- required:true,
- regexp:/^mailto:/
-}</pre>
- </td>
- <td> </td>
- </tr>
- <tr>
- <td>PDFjs</td>
- <td>
- <pre class="brush: js">
-type: "application/pdf"</pre>
- </td>
- <td>當 App 要顯示 PDF 文件內容時使用。</td>
- </tr>
- <tr>
- <td>Video</td>
- <td>
- <pre class="brush: js">
-type: [
- "video/webm",
- "video/mp4",
- "video/3gpp",
- "video/youtube"
-]</pre>
- <p>Also expect a <code>url</code> property which is a string.</p>
- </td>
- <td>當 App 要顯示影片時使用 (而 <code>open</code> 的 Activity 同樣可辦到)。</td>
- </tr>
- <tr>
- <td><code>update</code></td>
- <td>Communication</td>
- <td>
- <pre class="brush: js">
-type: "webcontacts/contact"</pre>
- </td>
- <td>當 App 要更新聯絡人時使用。</td>
- </tr>
- </tbody>
-</table>
-<h2 id="規格">規格</h2>
-<p><em>Web Activities</em> 目前尚不屬於任何規格,但其中某些部分與當前的 <a href="https://dvcs.w3.org/hg/web-intents/raw-file/tip/spec/Overview-respec.html" title="http://www.w3.org/TR/web-intents/">Web Intents</a> 有所重複。事實上,Mozilla 規劃 <em>Web Activities </em>正是想提議用以替代 <em>Web Intents</em>。若要進一步了解相關資訊,可參閱 <a href="http://lists.w3.org/Archives/Public/public-web-intents/2012Jun/0061.html" title="http://lists.w3.org/Archives/Public/public-web-intents/2012Jun/0061.html">Web Intents Task Force ML</a> 上的討論。</p>
-<h2 id="另可參閱">另可參閱</h2>
-<ul>
- <li>{{domxref("MozActivity")}}</li>
- <li>{{domxref("MozActivityRequestHandler")}}</li>
- <li>{{domxref("MozActivityOptions")}}</li>
- <li>{{domxref("window.navigator.mozSetMessageHandler()","navigator.mozSetMessageHandler()")}}</li>
- <li><a href="https://hacks.mozilla.org/2013/01/introducing-web-activities/" title="https://hacks.mozilla.org/2013/01/introducing-web-activities/">Introducing Web Activities</a></li>
-</ul>
diff --git a/files/zh-tw/webapi/webfm_api/index.html b/files/zh-tw/webapi/webfm_api/index.html
deleted file mode 100644
index 76a85372f1..0000000000
--- a/files/zh-tw/webapi/webfm_api/index.html
+++ /dev/null
@@ -1,130 +0,0 @@
----
-title: WebFM API
-slug: WebAPI/WebFM_API
-translation_of: Archive/B2G_OS/API/WebFM_API
----
-<p>{{ non-standard_header() }}</p>
-<p>{{ B2GOnlyHeader2('installed') }}</p>
-<h2 id="摘要">摘要</h2>
-<p>WebFM API 可存取裝置的 FM 收音機,進而開/關收音機並切換電台。另可透過 <a href="https://developer.mozilla.org/en-US/docs/Web/API/window.navigator.mozFMRadio" title="/en-US/docs/Web/API/window.navigator.mozFMRadio"><code>navigator.mozFMRadio</code></a> 屬性 (為 <a href="https://developer.mozilla.org/en-US/docs/Web/API/FMRadio" title="/en-US/docs/Web/API/FMRadio"><code>FMRadio</code></a> 物件) 而存取此 API。</p>
-<h2 id="開關收音機">開/關收音機</h2>
-<p><a href="https://developer.mozilla.org/en-US/docs/Web/API/FMRadio.enable" title="/en-US/docs/Web/API/FMRadio.enable"><code>FMRadio.enable()</code></a> 函式可開啟收音機;<a href="https://developer.mozilla.org/en-US/docs/Web/API/FMRadio.disable" title="/en-US/docs/Web/API/FMRadio.disable"><code>FMRadio.disable()</code></a> 函式則是關閉收音機。</p>
-<p>在開啟收音機之前,應先檢查裝置是否具備天線 (若無天線,內建的收音機當然也收不到訊號)。透過 <a href="https://developer.mozilla.org/en-US/docs/Web/API/FMRadio.antennaAvailable" title="/en-US/docs/Web/API/FMRadio.antennaAvailable"><code>FMRadio.antennaAvailable</code></a> 屬性即可獲得天線資訊。行動裝置往往將耳機纜線作為收音機天線。由於使用者可隨時插入/拔除耳機,因此每次只要天線狀態改變,WebFM API 均將發出 <code><a href="https://developer.mozilla.org/en-US/docs/Web/Reference/Events/antennaavailablechange" title="/en-US/docs/Web/Reference/Events/antennaavailablechange">antennaavailablechange</a></code> 事件。</p>
-<p>開啟收音機就必須要有可聆聽的頻道。而頻率 (以 MHz 為單位) 將以數字形式傳送至 <a href="https://developer.mozilla.org/en-US/docs/Web/API/FMRadio.enable" title="/en-US/docs/Web/API/FMRadio.enable"><code>FMRadio.enable()</code></a> 函式。</p>
-<pre class="brush: js">// The frequency of the radio station
-// to listen express in MHz
-var frequency = 99.1;
-var radio = navigator.mozFMRadio;
-
-if (radio.antennaAvailable) {
- radio.enable(frenquency);
-} else {
- alert("You need to plug your headphone");
-}
-
-radio.addEventListener('antennaavailablechange', function () {
- if (radio.antennaAvailable) {
- radio.enable(frenquency);
- } else {
- radio.disable();
- }
-})
-</pre>
-<div class="note">
- <p><strong>注意:</strong>透過裝置上的可用 <code>normal</code> 音訊通道,即可輸出音訊。</p>
-</div>
-<h2 id="切換不同頻率">切換不同頻率</h2>
-<p>使用者可手動或讓裝置自動切換頻率。不論是手動或自動,均將透過 <a href="https://developer.mozilla.org/en-US/docs/Web/API/FMRadio.frequency" title="/en-US/docs/Web/API/FMRadio.frequency"><code>FMRadio.frequency</code></a> 屬性存取目前的收音機頻率。該屬性則以 <a href="http://en.wikipedia.org/wiki/Hertz" title="http://en.wikipedia.org/wiki/Hertz">MHz</a> 呈現頻率。</p>
-<h3 id="手動切換">手動切換</h3>
-<p>必須以 <a href="https://developer.mozilla.org/en-US/docs/Web/API/FMRadio.setFrequency" title="/en-US/docs/Web/API/FMRadio.setFrequency"><code>FMRadio.setFrequency()</code></a> 函式設定新的頻率,但所能設定的值有某些限制。此函式將回傳 <a href="https://developer.mozilla.org/en-US/docs/Web/API/DOMRequest" title="/en-US/docs/Web/API/DOMRequest"><code>DOMRequest</code></a> 物件,以處理函式呼叫的成功或錯誤狀態。而頻率必須滿足下列要求:</p>
-<ul>
- <li>頻率必須落在 <a href="https://developer.mozilla.org/en-US/docs/Web/API/FMRadio.frequencyLowerBound" title="/en-US/docs/Web/API/FMRadio.frequencyLowerBound"><code>FMRadio.frequencyLowerBound</code></a> 與 <a href="https://developer.mozilla.org/en-US/docs/Web/API/FMRadio.frequencyUpperBound" title="/en-US/docs/Web/API/FMRadio.frequencyUpperBound"><code>FMRadio.frequencyUpperBound</code></a> 所定義的範圍中。若頻率在此範圍之外,就會產生錯誤。</li>
- <li>頻率必須根據 <a href="https://developer.mozilla.org/en-US/docs/Web/API/FMRadio.channelWidth" title="/en-US/docs/Web/API/FMRadio.channelWidth"><code>FMRadio.channelWidth</code></a> 的值而變化,否則亦將四捨五入。舉例來說,若 100 Mz 為有效頻率,且 channelWidth 為 0.2 時,則 100.2 與 99.8 將成為有效頻率。但若是 100.15 將四捨五入為 100.2。</li>
-</ul>
-<pre class="brush: js">var change = radio.setFrequency(frequency);
-
-change.onerror = function () {
- var min = radio.frequencyLowerBound;
- var max = radio.frequencyUpperBound;
- console.warn('The frequency must be within the range [' + min + ',' + max + ']');
-}
-
-change.onsuccess = function () {
- console.log('The frequency has been set to ' + radio.frequency);
-}
-</pre>
-<h3 id="自動搜尋">自動搜尋</h3>
-<p>WebFM API 亦可自動搜尋收音機頻道。我們使用 <a href="https://developer.mozilla.org/en-US/docs/Web/API/FMRadio.seekUp" title="/en-US/docs/Web/API/FMRadio.seekUp"><code>FMRadio.seekUp()</code></a> 與 <a href="https://developer.mozilla.org/en-US/docs/Web/API/FMRadio.seekDown" title="/en-US/docs/Web/API/FMRadio.seekDown"><code>FMRadio.seekDown()</code></a> 函式。前者將從目前頻道再尋找更高的頻率;後者反之。此 2 組函式均將回傳 <a href="https://developer.mozilla.org/en-US/docs/Web/API/DOMRequest" title="/en-US/docs/Web/API/DOMRequest"><code>DOMRequest</code></a> 物件,以處理函式呼叫的成功或錯誤狀態。</p>
-<p>WebFM API 亦可自動搜尋收音機頻道。我們使用 <a href="https://developer.mozilla.org/en-US/docs/Web/API/FMRadio.seekUp" title="/en-US/docs/Web/API/FMRadio.seekUp"><code>FMRadio.seekUp()</code></a> 與 <a href="https://developer.mozilla.org/en-US/docs/Web/API/FMRadio.seekDown" title="/en-US/docs/Web/API/FMRadio.seekDown"><code>FMRadio.seekDown()</code></a> 函式。前者將從目前頻道再尋找更高的頻率;後者反之。此 2 組函式均將回傳 <a href="https://developer.mozilla.org/en-US/docs/Web/API/DOMRequest" title="/en-US/docs/Web/API/DOMRequest"><code>DOMRequest</code></a> 物件,以處理函式呼叫的成功或錯誤狀態。</p>
-<p>且此 2 組函式在到達 <a href="https://developer.mozilla.org/en-US/docs/Web/API/FMRadio.frequencyLowerBound" title="/en-US/docs/Web/API/FMRadio.frequencyLowerBound"><code>frequencyLowerBound</code></a> 或 <a href="https://developer.mozilla.org/en-US/docs/Web/API/FMRadio.frequencyUpperBound" title="/en-US/docs/Web/API/FMRadio.frequencyUpperBound"><code>frequencyUpperBound</code></a> 的值之後,均將再次循環較高/較低頻率。一旦找到新頻道,就會更改目前頻率並發出 <code><a href="https://developer.mozilla.org/en-US/docs/Web/Reference/Events/frequencychange" title="/en-US/docs/Web/Reference/Events/frequencychange">frequencychange</a></code> 事件。</p>
-<p>此 2 組函式並無法同時搜尋,也就是無法同時往上並往下搜尋頻率,否則將發生錯誤。而呼叫 <a href="https://developer.mozilla.org/en-US/docs/Web/API/FMRadio.cancelSeek" title="/en-US/docs/Web/API/FMRadio.cancelSeek"><code>FMRadio.cancelSeek()</code></a> 函式即可停止搜尋頻率。此函式亦將回傳 <a href="https://developer.mozilla.org/en-US/docs/Web/API/DOMRequest" title="/en-US/docs/Web/API/DOMRequest"><code>DOMRequest</code></a> 物件。</p>
-<pre class="brush: js">var radio = navigator.mozFMRadio;
-var seeking = false;
-var UP = document.querySelector("button.up");
-var DOWN = document.querySelector("button.down");
-
-// When the frequency change, the seek
-// functions automatically stop to seek.
-radio.onfrequencychange = function () {
- seeking = false;
-}
-
-function seek(direction) {
- var cancel, search;
-
- // If the radio is already seeking
- // we will cancel the current search.
- if (seeking) {
- var cancel = radio.cancelSeek();
- cancel.onsuccess = function () {
- seeking = false;
-
- // Once the radio no longer seek,
- // we can try to seek as expected
- seek(direction);
- }
-
- // Let's seek up
- } else if (direction === 'up') {
- // Just to be sure that the radio is turned on
- if (!radio.enabled) {
- radio.enable(radio.frequencyLowerBound);
- }
- search = radio.seekUp();
-
- // Let's seek up
- } else if (direction === 'down' {
- // Just to be sure that the radio is turned on
- if (!radio.enabled) {
- radio.enable(radio.frequencyUpperBound);
- }
- search = radio.seekDown();
- }
-
- if (search) {
- search.onsuccess = function () {
- // Ok, we are seeking now.
- seeking = true;
- };
- search.onerror = function () {
- // Something goes wrong... ok, let's try again.
- seek(direction);
- }
- }
-}
-
-UP.addEventListener('click', function () {
- seek('up');
-});
-
-DOWN.addEventListener('click', function () {
- seek('down');
-});
-</pre>
-<h2 id="規格">規格</h2>
-<p>尚無任何規格。</p>
-<h2 id="另可參閱">另可參閱</h2>
-<ul>
- <li>{{domxref("FMRadio")}}</li>
- <li><a href="https://github.com/mozilla-b2g/gaia/tree/master/apps/fm" title="https://github.com/mozilla-b2g/gaia/tree/master/apps/fm">Gaïa 上的 FM App</a></li>
-</ul>
diff --git a/files/zh-tw/webapi/websms/index.html b/files/zh-tw/webapi/websms/index.html
deleted file mode 100644
index 16ef3887cf..0000000000
--- a/files/zh-tw/webapi/websms/index.html
+++ /dev/null
@@ -1,130 +0,0 @@
----
-title: WebSMS
-slug: WebAPI/WebSMS
-translation_of: Archive/B2G_OS/API/Mobile_Messaging_API
----
-<p>{{ non-standard_header() }}</p>
-
-<p>{{ B2GOnlyHeader2('certified') }}</p>
-
-<h2 id="摘要">摘要</h2>
-
-<p>WebSMS API 可讓網頁內容能建立、傳送、接收文字簡訊 (SMS) 或多媒體訊息 (MMS)。</p>
-
-<p>透過 <a href="https://developer.mozilla.org/en-US/docs/Web/API/window.navigator.mozSms" title="Returns an SmsManager object you can use to receive and send SMS messages."><code>window.navigator.mozSms</code></a> (將回傳 <a href="https://developer.mozilla.org/en-US/docs/Web/API/MozSmsManager" title="Provides support for sending and managing SMS messages on a device with WebSMS."><code>MozSmsManager</code></a> 物件),或是 <a href="https://developer.mozilla.org/en-US/docs/Web/API/window.navigator.mozMobileMessage" title="Returns a MozMobileMessageManager object you can use to receive and send MMS and SMS messages."><code>window.navigator.mozMobileMessage</code></a> (將回傳 <a href="https://developer.mozilla.org/en-US/docs/Web/API/MozMobileMessageManager" title="Provides support for sending and managing both MMS and SMS messages on a device with WebSMS."><code>MozMobileMessageManager</code></a> 物件),均可存取此 API。</p>
-
-<h2 id="DOM_介面">DOM 介面</h2>
-
-<h3 id="SMS_介面">SMS 介面</h3>
-
-<ul>
- <li>{{ domxref("window.navigator.mozSms") }} {{deprecated_inline("25")}}</li>
- <li>{{ domxref("MozSmsManager") }} {{deprecated_inline("25")}}</li>
- <li>{{ domxref("MozSmsMessage") }}</li>
- <li>{{ domxref("MozSmsEvent") }}</li>
- <li>{{ domxref("MozSmsFilter") }}</li>
- <li>{{ domxref("MozSmsSegmentInfo") }}</li>
-</ul>
-
-<h3 id="MMS_與_SMS_介面">MMS 與 SMS 介面</h3>
-
-<ul>
- <li>{{ domxref("MozMobileMessageManager")}}</li>
- <li>{{ domxref("MozMmsMessage") }}</li>
- <li>{{ domxref("MozMmsEvent") }}</li>
- <li>{{ domxref("MozMobileMessageThread") }}</li>
-</ul>
-
-<h2 id="範例程式碼與介紹">範例程式碼與介紹</h2>
-
-<ul>
- <li><a href="/en-US/docs/WebAPI/WebSMS/Introduction_to_Mobile_Message_API" title="en/API/WebSMS/Introduction_to_WebSMS">Mobile Message API 介紹</a></li>
-</ul>
-
-<h2 id="規格">規格</h2>
-
-<p>此 API 目前尚未成為標準規格。可至 W3C 的 <a href="http://www.w3.org/2012/sysapps/" title="http://www.w3.org/2012/sysapps/">System Application Working Group</a> 參與相關討論。</p>
-
-<table class="standard-table">
- <thead>
- <tr>
- <th scope="col">Specification</th>
- <th scope="col">Status</th>
- <th scope="col">Comment</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>{{SpecName('Messaging')}}</td>
- <td>{{Spec2('Messaging')}}</td>
- <td>Editor Draft (WIP).</td>
- </tr>
- </tbody>
-</table>
-
-<h2 id="瀏覽器相容性">瀏覽器相容性</h2>
-
-<p>當然,主要支援行動瀏覽器。</p>
-
-<p>{{ CompatibilityTable() }}</p>
-
-<div id="compat-desktop">
-<table class="compat-table">
- <tbody>
- <tr>
- <th>Feature</th>
- <th>Chrome</th>
- <th>Firefox (Gecko)</th>
- <th>Internet Explorer</th>
- <th>Opera</th>
- <th>Safari</th>
- </tr>
- <tr>
- <td>Basic support</td>
- <td>{{ CompatNo() }}</td>
- <td>{{ CompatNo() }}</td>
- <td>{{ CompatNo() }}</td>
- <td>{{ CompatNo() }}</td>
- <td>{{ CompatNo() }}</td>
- </tr>
- </tbody>
-</table>
-</div>
-
-<div id="compat-mobile">
-<table class="compat-table">
- <tbody>
- <tr>
- <th>Feature</th>
- <th>Android</th>
- <th>Firefox Mobile (Gecko)</th>
- <th>IE Mobile</th>
- <th>Opera Mobile</th>
- <th>Safari Mobile</th>
- </tr>
- <tr>
- <td>Basic support</td>
- <td>{{ CompatNo() }}</td>
- <td>{{ CompatGeckoMobile("12.0") }}</td>
- <td>{{ CompatNo() }}</td>
- <td>{{ CompatNo() }}</td>
- <td>{{ CompatNo() }}</td>
- </tr>
- </tbody>
-</table>
-</div>
-
-<h2 id="相關設定">相關設定</h2>
-
-<ul>
- <li>WebSMS 預設為停用,可將 <code>dom.sms.enabled</code> 設定為 true 即可啟用。</li>
- <li>允許使用 WebSMS API 的主機名稱,均以逗號區隔,且必須透過 <code>dom.sms.whitelist</code> 指定之。此字串預設為空白。</li>
- <li>WebSMS 僅能用於 Firefox OS (B2G) 的 Certified Apps 之上。</li>
- <li>從 Firefox OS 1.1 開始,即可使用 MMS。</li>
-</ul>
-
-<h2 class="note" id="另可參閱">另可參閱</h2>
-
-<ul>
- <li><a class="link-https" href="https://wiki.mozilla.org/WebAPI/WebSMS" title="https://wiki.mozilla.org/WebAPI/WebSMS">WebSMS API</a> (設計文件)</li>
-</ul>