diff options
author | Florian Merz <me@fiji-flo.de> | 2021-02-11 13:12:08 +0100 |
---|---|---|
committer | Florian Merz <me@fiji-flo.de> | 2021-02-11 13:12:08 +0100 |
commit | 43a5cac2eff22c21071800e13bef12af9d3a37d0 (patch) | |
tree | f6e91f8aa958f15bd0b0aabf7b8dfc09063eceda /files/zh-tw/web/api/window/sidebar | |
parent | 8260a606c143e6b55a467edf017a56bdcd6cba7e (diff) | |
download | translated-content-43a5cac2eff22c21071800e13bef12af9d3a37d0.tar.gz translated-content-43a5cac2eff22c21071800e13bef12af9d3a37d0.tar.bz2 translated-content-43a5cac2eff22c21071800e13bef12af9d3a37d0.zip |
unslug zh-tw: move
Diffstat (limited to 'files/zh-tw/web/api/window/sidebar')
-rw-r--r-- | files/zh-tw/web/api/window/sidebar/adding_search_engines_from_web_pages/index.html | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/files/zh-tw/web/api/window/sidebar/adding_search_engines_from_web_pages/index.html b/files/zh-tw/web/api/window/sidebar/adding_search_engines_from_web_pages/index.html deleted file mode 100644 index 780e92fb84..0000000000 --- a/files/zh-tw/web/api/window/sidebar/adding_search_engines_from_web_pages/index.html +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: 自網頁添加搜尋引擎 -slug: Web/API/Window/sidebar/Adding_search_engines_from_Web_pages -tags: - - 搜尋模組 -translation_of: Web/OpenSearch -translation_of_original: Web/API/Window/sidebar/Adding_search_engines_from_Web_pages ---- -<p>Firefox 可以用 JavaScript 安裝搜尋引擎模組,且支援 <a href="zh_tw/%e8%a3%bd%e4%bd%9c_OpenSearch_%e6%90%9c%e5%b0%8b%e6%a8%a1%e7%b5%84">OpenSearch</a> 及 Sherlock 兩種模組格式。 -</p> -<div class="note"><b>註:</b> 自 Firefox 2 起,偏好的模組格式為 OpenSearch。</div> -<p>當 JavaScript 程式碼要安裝新的搜尋模組時,Firefox 會詢問使用者是否允許安裝。 -</p> -<h2 id=".E5.AE.89.E8.A3.9D_OpenSearch_.E6.A8.A1.E7.B5.84">安裝 OpenSearch 模組</h2> -<p>要安裝 OpenSearch 模組,必須使用 <code>window.external.AddSearchProvider()</code> DOM 方法。此方法的語法為: -</p> -<pre class="eval">window.external.AddSearchProvider(<i>搜尋模組 URL</i>); -</pre> -<p>其中 <i>搜尋模組 URL</i> 為搜尋引擎模組之 XML 檔的絕對連結 URL。 -</p> -<div class="note"><b>注意:</b> OpenSearch 自 Firefox 2 起的版本才支援。</div> -<h2 id=".E5.AE.89.E8.A3.9D_Sherlock_.E6.A8.A1.E7.B5.84">安裝 Sherlock 模組</h2> -<p>要安裝 Sherlock 模組,必須叫用 <code>window.sidebar.addSearchEngine()</code> 方法,語法為: -</p> -<pre class="eval">window.sidebar.addSearchEngine(<i>搜尋模組 URL</i>, <i>圖示 URL</i>, <i>建議名稱</i>, <i>建議分類</i>); -</pre> -<ul><li> <code>搜尋模組 URL</code> 參數為欲安裝的 Sherlock 格式檔(「.src」檔)URL。 -</li><li> <code>圖示 URL</code> 參數為此模組的圖示 URL。 -</li><li> <code>建議名稱</code> 參數僅於請求使用者確認安裝模組時才使用,安裝時訊息為「Do you want to install <i>建議名稱</i> from <i>搜尋模組 URL</i>?」 -</li><li> <code>建議分類</code> 參數並不使用,可以指定為空字串(<code>""</code>)或 <code>null</code>。 -</li></ul> -<p>Sherlock 的相關資訊可參考 <a class=" external" href="http://developer.apple.com/macosx/sherlock/">http://developer.apple.com/macosx/sherlock/</a> -</p> -<div class="noinclude"> -</div> -{{ languages( { "ca": "ca/Addici\u00f3_de_motors_de_cerca_a_les_p\u00e0gines_web", "en": "en/Adding_search_engines_from_web_pages", "es": "es/A\u00f1adir_motores_de_b\u00fasqueda_desde_p\u00e1ginas_web", "fr": "fr/Ajout_de_moteurs_de_recherche_depuis_des_pages_Web", "it": "it/Installare_plugin_di_ricerca_dalle_pagine_web", "ja": "ja/Adding_search_engines_from_web_pages", "pl": "pl/Dodawanie_wyszukiwarek_z_poziomu_stron_WWW" } ) }} |