diff options
ui - use global.platform for extension interaction
Diffstat (limited to 'app')
-rw-r--r-- | app/scripts/platforms/extension.js | 4 | ||||
-rw-r--r-- | app/scripts/popup.js | 4 |
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) |