aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/lib
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2017-03-31 09:35:22 +0800
committerkumavis <aaron@kumavis.me>2017-03-31 09:35:22 +0800
commit6259ffaef4f2045d2de069ea83de47b64b5fba86 (patch)
tree7836bea07ed09bb3379a28cc2debef55722ed89d /app/scripts/lib
parent5036263f88a1f61957982b64d27472a516c28def (diff)
downloadtangerine-wallet-browser-6259ffaef4f2045d2de069ea83de47b64b5fba86.tar.gz
tangerine-wallet-browser-6259ffaef4f2045d2de069ea83de47b64b5fba86.tar.zst
tangerine-wallet-browser-6259ffaef4f2045d2de069ea83de47b64b5fba86.zip
extension - remove local extension files, we use extensionizer
Diffstat (limited to 'app/scripts/lib')
-rw-r--r--app/scripts/lib/extension-instance.js68
-rw-r--r--app/scripts/lib/extension.js17
2 files changed, 0 insertions, 85 deletions
diff --git a/app/scripts/lib/extension-instance.js b/app/scripts/lib/extension-instance.js
deleted file mode 100644
index 628b62e3f..000000000
--- a/app/scripts/lib/extension-instance.js
+++ /dev/null
@@ -1,68 +0,0 @@
-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
-
- apis.forEach(function (api) {
-
- _this[api] = null
-
- try {
- if (chrome[api]) {
- _this[api] = chrome[api]
- }
- } catch (e) {}
-
- try {
- if (window[api]) {
- _this[api] = window[api]
- }
- } catch (e) {}
-
- try {
- if (browser[api]) {
- _this[api] = browser[api]
- }
- } catch (e) {}
- try {
- _this.api = browser.extension[api]
- } catch (e) {}
- })
-
- try {
- if (browser && browser.runtime) {
- this.runtime = browser.runtime
- }
- } catch (e) {}
-
- try {
- if (browser && browser.browserAction) {
- this.browserAction = browser.browserAction
- }
- } catch (e) {}
-
-}
-
-module.exports = Extension
diff --git a/app/scripts/lib/extension.js b/app/scripts/lib/extension.js
deleted file mode 100644
index 6f8b5d800..000000000
--- a/app/scripts/lib/extension.js
+++ /dev/null
@@ -1,17 +0,0 @@
-/* Extension.js
- *
- * A module for unifying browser differences in the WebExtension API.
- *
- * Initially implemented because Chrome hides all of their WebExtension API
- * behind a global `chrome` variable, but we'd like to start grooming
- * the code-base for cross-browser extension support.
- *
- * You can read more about the WebExtension API here:
- * https://developer.mozilla.org/en-US/Add-ons/WebExtensions
- */
-
-const Extension = require('./extension-instance')
-const instance = new Extension()
-window.METAMASK_EXTENSION = instance
-module.exports = instance
-