EmailThis / extension-boilerplate

⚡️ A template for building cross browser extensions for Chrome, Opera & Firefox.
https://www.emailthis.me/open-source/extension-boilerplate
MIT License
3.28k stars 370 forks source link

Supporting chrome.topSites api #21

Open usamaejaz opened 6 years ago

usamaejaz commented 6 years ago

I wanted to use the chrome.topSites api but it was not already in the scripts/utils/ext.js. Just wanted to leave a note here that it "topSites" api is not in the array by default.

kgoedecke commented 6 years ago

Did you try usingbrowser.topSites?

usamaejaz commented 6 years ago

@kgoedecke using browser.topSites or even chrome.topSites directly is fine. But i am talking about proxying the apis.

scripts/utils/ext.js:

const apis = [
  'alarms',
  'bookmarks',
  'browserAction',
  'commands',
  'contextMenus',
  'cookies',
  'downloads',
  'events',
  'extension',
  'extensionTypes',
  'history',
  'i18n',
  'idle',
  'notifications',
  'pageAction',
  'runtime',
  'storage',
  'tabs', 
  'topSites', // <------------- this. 
  'webNavigation',
  'webRequest',
  'windows',
]

It will be better if that api is there by default.

usamaejaz commented 6 years ago

Same for management