我的扩展程序显示我访问过特定网站(youtube.com,quora.com)的次数,保存在本地存储空间并在打开新标签页时显示。扩展程序的结构如下所示:
的manifest.json
{
"manifest_version": 2,
"name": "Getting started example",
"description": "",
"version": "1.0",
"chrome_url_overrides" : {
"newtab": "index.html"
}
}
index.html包含script.js.我的问题是如何跟踪访问过的url列表。我需要使用后台页面还是我可以在script.js中使用chrome API作为当前url?