diff options
author | Kevin Serrano <kevgagser@gmail.com> | 2016-07-22 02:30:57 +0800 |
---|---|---|
committer | Kevin Serrano <kevgagser@gmail.com> | 2016-07-22 02:30:57 +0800 |
commit | 7b85802a0fede74217dd702ddda9bea1154517eb (patch) | |
tree | 055d903420fb1e04bc01d8bc542b389581ca4b41 /app/scripts/lib/extension-instance.js | |
parent | 4a9d5b1c258912acedd6f1e89fb632526d9c910b (diff) | |
parent | 6658bea8d444281491718f8eee7bc3ae42f91b69 (diff) | |
download | tangerine-wallet-browser-7b85802a0fede74217dd702ddda9bea1154517eb.tar tangerine-wallet-browser-7b85802a0fede74217dd702ddda9bea1154517eb.tar.gz tangerine-wallet-browser-7b85802a0fede74217dd702ddda9bea1154517eb.tar.bz2 tangerine-wallet-browser-7b85802a0fede74217dd702ddda9bea1154517eb.tar.lz tangerine-wallet-browser-7b85802a0fede74217dd702ddda9bea1154517eb.tar.xz tangerine-wallet-browser-7b85802a0fede74217dd702ddda9bea1154517eb.tar.zst tangerine-wallet-browser-7b85802a0fede74217dd702ddda9bea1154517eb.zip |
Merge branch 'master' into usd-conversion
Diffstat (limited to 'app/scripts/lib/extension-instance.js')
-rw-r--r-- | app/scripts/lib/extension-instance.js | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/app/scripts/lib/extension-instance.js b/app/scripts/lib/extension-instance.js new file mode 100644 index 000000000..eeab6c6d0 --- /dev/null +++ b/app/scripts/lib/extension-instance.js @@ -0,0 +1,38 @@ +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 |