aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2017-04-01 09:04:13 +0800
committerkumavis <aaron@kumavis.me>2017-04-01 09:04:13 +0800
commitaa06183c64b79316a4622e25791c29e785c7bce0 (patch)
tree4711fb76510b379cd6b7bc3fb2e07e87a0ef8b8b /app
parent810f5881f6ad9fea9bcb25ea1ccaf9cdeb2c744f (diff)
downloadtangerine-wallet-browser-aa06183c64b79316a4622e25791c29e785c7bce0.tar
tangerine-wallet-browser-aa06183c64b79316a4622e25791c29e785c7bce0.tar.gz
tangerine-wallet-browser-aa06183c64b79316a4622e25791c29e785c7bce0.tar.bz2
tangerine-wallet-browser-aa06183c64b79316a4622e25791c29e785c7bce0.tar.lz
tangerine-wallet-browser-aa06183c64b79316a4622e25791c29e785c7bce0.tar.xz
tangerine-wallet-browser-aa06183c64b79316a4622e25791c29e785c7bce0.tar.zst
tangerine-wallet-browser-aa06183c64b79316a4622e25791c29e785c7bce0.zip
ui - use global.platform for extension interaction
Diffstat (limited to 'app')
-rw-r--r--app/scripts/platforms/extension.js4
-rw-r--r--app/scripts/popup.js4
2 files changed, 8 insertions, 0 deletions
diff --git a/app/scripts/platforms/extension.js b/app/scripts/platforms/extension.js
index cbb35768e..00c2aa275 100644
--- a/app/scripts/platforms/extension.js
+++ b/app/scripts/platforms/extension.js
@@ -14,6 +14,10 @@ class ExtensionPlatform {
extension.tabs.create({ url })
}
+ getVersion () {
+ return extension.runtime.getManifest().version
+ }
+
}
module.exports = ExtensionPlatform
diff --git a/app/scripts/popup.js b/app/scripts/popup.js
index ce18dc422..0fbde54b3 100644
--- a/app/scripts/popup.js
+++ b/app/scripts/popup.js
@@ -4,9 +4,13 @@ const startPopup = require('./popup-core')
const PortStream = require('./lib/port-stream.js')
const isPopupOrNotification = require('./lib/is-popup-or-notification')
const extension = require('extensionizer')
+const ExtensionPlatform = require('./platforms/extension')
const NotificationManager = require('./lib/notification-manager')
const notificationManager = new NotificationManager()
+// create platform global
+global.platform = new ExtensionPlatform()
+
// inject css
const css = MetaMaskUiCss()
injectCss(css)