mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-23 18:41:38 +01:00
6658bea8d4
* Add mozilla plugin key to manifest * Move all chrome references into platform-checking module Addresses #453 * Add chrome global back to linter blacklist * Add tests
39 lines
542 B
JavaScript
39 lines
542 B
JavaScript
const apis = [
|
|
'alarms',
|
|
'bookmarks',
|
|
'browserAction',
|
|
'commands',
|
|
'contextMenus',
|
|
'cookies',
|
|
'downloads',
|
|
'events',
|
|
'extension',
|
|
'extensionTypes',
|
|
'history',
|
|
'i18n',
|
|
'idle',
|
|
'notifications',
|
|
'pageAction',
|
|
'runtime',
|
|
'storage',
|
|
'tabs',
|
|
'webNavigation',
|
|
'webRequest',
|
|
'windows',
|
|
]
|
|
|
|
function Extension () {
|
|
const _this = this
|
|
let global = window
|
|
|
|
if (window.chrome) {
|
|
global = window.chrome
|
|
}
|
|
|
|
apis.forEach(function (api) {
|
|
_this[api] = global[api]
|
|
})
|
|
}
|
|
|
|
module.exports = Extension
|