topSites
topSites API を使うと、ユーザーがよく訪れるページをを含む配列を取得できます。
ブラウザーはユーザーがこれらの場所に簡単に戻れるようにこれを維持します。Firefox では既定で「新しいタブ」ページには最もよく訪れるページのリストが提供されます。
topSites API を使うには "topSites" の API パーミッション必要です。
型
topSites.MostVisitedURL
-
ウェブサイトのタイトルと URL を含むオブジェクト。
Methods
topSites.get()
-
ブラウザーの「新しいタブ」ページに載っているすべてのサイトの配列を取得します。ここで返されるサイトの数はブラウザー固有であり、返されるサイトは、ブラウザー履歴に基づいてユーザー固有であることに注意してください。
ブラウザーの互換性
Report problems with this compatibility data on GitHubdesktop | mobile | ||||||
---|---|---|---|---|---|---|---|
topSites | |||||||
MostVisitedURL | |||||||
MostVisitedURL.favicon | |||||||
get | |||||||
get.options | |||||||
options.includeBlocked | |||||||
options.includeFavicon | |||||||
options.includePinned | |||||||
options.includeSearchShortcuts | |||||||
options.limit | |||||||
options.newtab | |||||||
options.onePerDomain |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
- See implementation notes.
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Example extensions
メモ:
This API is based on Chromium's chrome.topSites
API.Microsoft Edge compatibility data is supplied by Microsoft Corporation and is included here under the Creative Commons Attribution 3.0 United States License.