I've been trying to make a simple Chrome Extension using React. The manifest looks something like this:
{
"name": "New Tab",
"version": "1.0",
"manifest_version": 2,
"description": "A minimalist replacement for Chrome's New Tab page.",
"chrome_url_overrides": {
"newtab": "index.html"
},
"permissions": ["tabs", "topSites"]
}
I'm not sure how to actually use the Chrome topSites API in React. I've been looking at the documentation https://developer.chrome.com/extensions/topSites but it doesn't provide much insight. I'm trying to do something like this to get an array of data.
chrome.topSites.get(console.log)
However,
'chrome' is not defined no-undef