aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app
diff options
context:
space:
mode:
authorDan Finlay <somniac@me.com>2016-07-22 01:45:32 +0800
committerGitHub <noreply@github.com>2016-07-22 01:45:32 +0800
commit6658bea8d444281491718f8eee7bc3ae42f91b69 (patch)
tree1bfc13870221528af34df95e5f64f0d73b75aa16 /ui/app
parentcdd7e40545af8e62fc586f8da120e8d05ca90653 (diff)
downloadtangerine-wallet-browser-6658bea8d444281491718f8eee7bc3ae42f91b69.tar
tangerine-wallet-browser-6658bea8d444281491718f8eee7bc3ae42f91b69.tar.gz
tangerine-wallet-browser-6658bea8d444281491718f8eee7bc3ae42f91b69.tar.bz2
tangerine-wallet-browser-6658bea8d444281491718f8eee7bc3ae42f91b69.tar.lz
tangerine-wallet-browser-6658bea8d444281491718f8eee7bc3ae42f91b69.tar.xz
tangerine-wallet-browser-6658bea8d444281491718f8eee7bc3ae42f91b69.tar.zst
tangerine-wallet-browser-6658bea8d444281491718f8eee7bc3ae42f91b69.zip
Implement some cross-browser practices (#473)
* 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
Diffstat (limited to 'ui/app')
-rw-r--r--ui/app/components/transaction-list-item.js3
-rw-r--r--ui/app/info.js7
2 files changed, 6 insertions, 4 deletions
diff --git a/ui/app/components/transaction-list-item.js b/ui/app/components/transaction-list-item.js
index 78867fca4..796ba61ae 100644
--- a/ui/app/components/transaction-list-item.js
+++ b/ui/app/components/transaction-list-item.js
@@ -7,6 +7,7 @@ const addressSummary = require('../util').addressSummary
const explorerLink = require('../../lib/explorer-link')
const CopyButton = require('./copyButton')
const vreme = new (require('vreme'))
+const extension = require('../../../app/scripts/lib/extension')
const TransactionIcon = require('./transaction-list-item-icon')
@@ -49,7 +50,7 @@ TransactionListItem.prototype.render = function () {
if (!transaction.hash || !isLinkable) return
var url = explorerLink(transaction.hash, parseInt(network))
- chrome.tabs.create({ url })
+ extension.tabs.create({ url })
},
style: {
padding: '20px 0',
diff --git a/ui/app/info.js b/ui/app/info.js
index d97998fd7..4e540bd03 100644
--- a/ui/app/info.js
+++ b/ui/app/info.js
@@ -3,6 +3,7 @@ const Component = require('react').Component
const h = require('react-hyperscript')
const connect = require('react-redux').connect
const actions = require('./actions')
+const extension = require('../../app/scripts/lib/extension')
module.exports = connect(mapStateToProps)(InfoScreen)
@@ -19,7 +20,7 @@ InfoScreen.prototype.render = function () {
var state = this.props
var manifest
try {
- manifest = chrome.runtime.getManifest()
+ manifest = extension.runtime.getManifest()
} catch (e) {
manifest = { version: '2.0.0' }
}
@@ -105,7 +106,7 @@ InfoScreen.prototype.render = function () {
h('a.info', {
target: '_blank',
style: { width: '85vw' },
- onClick () { chrome.tabs.create({url: 'mailto:help@metamask.io?subject=Feedback'}) },
+ onClick () { extension.tabs.create({url: 'mailto:help@metamask.io?subject=Feedback'}) },
}, 'Email us any questions or comments!'),
]),
@@ -124,5 +125,5 @@ InfoScreen.prototype.render = function () {
}
InfoScreen.prototype.navigateTo = function (url) {
- chrome.tabs.create({ url })
+ extension.tabs.create({ url })
}