From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../add-ons/webextensions/api/history/index.html | 132 +++++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100644 files/ja/mozilla/add-ons/webextensions/api/history/index.html (limited to 'files/ja/mozilla/add-ons/webextensions/api/history/index.html') diff --git a/files/ja/mozilla/add-ons/webextensions/api/history/index.html b/files/ja/mozilla/add-ons/webextensions/api/history/index.html new file mode 100644 index 0000000000..20f5a6e995 --- /dev/null +++ b/files/ja/mozilla/add-ons/webextensions/api/history/index.html @@ -0,0 +1,132 @@ +--- +title: history +slug: Mozilla/Add-ons/WebExtensions/API/history +tags: + - API + - Add-ons + - Extensions + - History + - Interface + - Non-standard + - Reference + - WebExtensions +translation_of: Mozilla/Add-ons/WebExtensions/API/history +--- +
 {{AddonSidebar}}
+ +

ブラウザー履歴とやりとりする history API を使用します。

+ +
+

downloads は HistoryItem オブジェクトとして扱われるのに注意します。このため、ダウンロードのために history.onVisited も発火します。

+
+ +

ブラウザー履歴はユーザーが訪れたページの時間順の記録です。history API では次の事ができます:

+ + + +

しかしながら、ユーザーは1つのページを何度も訪問することがあるので、このAPI は「訪問数」の概念もあります。したがってこの API を次のようにも使えます:

+ + + +

このAPIを使うには manifest.json ファイルで指定する "history" パーミッションが必要です。

+ +

+ +
+
{{WebExtAPIRef("history.TransitionType")}}
+
ブラウザーがあるページにどのように移動したのかを記述
+
{{WebExtAPIRef("history.HistoryItem")}}
+
+

ブラウザー履歴のあるページに関する情報を提供

+
+
{{WebExtAPIRef("history.VisitItem")}}
+
+

ページへの単一の訪問を記述

+
+
+ +

関数

+ +
+
{{WebExtAPIRef("history.search()")}}
+
ブラウザー履歴を検索して、所与の条件にマッチする history.HistoryItem オブジェクトを得る
+
{{WebExtAPIRef("history.getVisits()")}}
+
所定のページへの訪問についての情報を取得する
+
{{WebExtAPIRef("history.addUrl()")}}
+
ブラウザー履歴に所定のページへの訪問のレコードを追加する
+
{{WebExtAPIRef("history.deleteUrl()")}}
+
ブラウザー履歴から 所定のURLへのすべての訪問を削除する
+
{{WebExtAPIRef("history.deleteRange()")}}
+
所定の時間範囲でユーザーが訪問したすべてのページを削除する
+
{{WebExtAPIRef("history.deleteAll()")}}
+
ブラウザー履歴からすべての訪問を削除する
+
+ +

イベント

+ +
+
{{WebExtAPIRef("history.onTitleChanged")}}
+
+
ユーザーがあるページに訪問してタイトルが記録された時に発火します
+
+
{{WebExtAPIRef("history.onVisited")}}
+
ユーザーがあるページに {{WebExtAPIRef("history.HistoryItem")}} を提供しつつそのページを訪問した時に発火します
+
{{WebExtAPIRef("history.onVisitRemoved")}}
+
+

ある URL がブラウザー履歴から完全に削除された時に発火します

+
+
+ +

ブラウザ実装状況

+ + + +

{{Compat("webextensions.api.history")}}

+ +

{{WebExtExamples("h2")}}

+ +
謝辞 + +

この API は Chromium の chrome.history API に基づいています。また、このドキュメントは history.json における Chromium のコードに基づいています。

+ +

Microsoft Edge での実装状況は Microsoft Corporation から提供されたものであり、ここでは Creative Commons Attribution 3.0 United States License に従っています。

+
+ + -- cgit v1.2.3-54-g00ecf