chrome.topSites

說明

使用 chrome.topSites API 存取新分頁頁面顯示的熱門網站 (即造訪次數最多的網站)。使用者自訂的快速鍵不在此限。

權限

topSites

如要使用這個 API,必須在擴充功能的資訊清單中宣告「topSites」權限。

{   "name": "My extension",   ...   "permissions": [     "topSites",   ],   ... } 

範例

如要試用這個 API,請從 chrome-extension-samples 存放區安裝 topSites API 範例

類型

MostVisitedURL

封裝最常造訪網址的物件,例如新分頁的預設捷徑。

屬性

  • title

    字串

    網頁標題

  • 網址

    字串

    造訪次數最多的網址。

方法

get()

chrome.topSites.get(): Promise<MostVisitedURL[]>

取得熱門網站清單。

傳回