aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/popup.js
diff options
context:
space:
mode:
authorFrankie <frankie.pangilinan@consensys.net>2016-08-11 04:48:34 +0800
committerFrankie <frankie.pangilinan@consensys.net>2016-08-11 04:48:34 +0800
commitba1edc429b948962fe0f03ef43588f7945cea3f2 (patch)
treeeda1b54a424c2fc06ef151763b5cb57d2e838116 /app/scripts/popup.js
parent9c6dd9ef4953f6e421feb6e6684ef43da26f6b75 (diff)
parentc48b60d7a6f14d2d2348be8d9a63965ca1267433 (diff)
downloadtangerine-wallet-browser-ba1edc429b948962fe0f03ef43588f7945cea3f2.tar
tangerine-wallet-browser-ba1edc429b948962fe0f03ef43588f7945cea3f2.tar.gz
tangerine-wallet-browser-ba1edc429b948962fe0f03ef43588f7945cea3f2.tar.bz2
tangerine-wallet-browser-ba1edc429b948962fe0f03ef43588f7945cea3f2.tar.lz
tangerine-wallet-browser-ba1edc429b948962fe0f03ef43588f7945cea3f2.tar.xz
tangerine-wallet-browser-ba1edc429b948962fe0f03ef43588f7945cea3f2.tar.zst
tangerine-wallet-browser-ba1edc429b948962fe0f03ef43588f7945cea3f2.zip
Merge branch 'master' into buyForm
Diffstat (limited to 'app/scripts/popup.js')
-rw-r--r--app/scripts/popup.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/app/scripts/popup.js b/app/scripts/popup.js
index 2e5b98896..20be15df7 100644
--- a/app/scripts/popup.js
+++ b/app/scripts/popup.js
@@ -9,6 +9,7 @@ const injectCss = require('inject-css')
const PortStream = require('./lib/port-stream.js')
const StreamProvider = require('web3-stream-provider')
const setupMultiplex = require('./lib/stream-utils.js').setupMultiplex
+const extension = require('./lib/extension')
// setup app
var css = MetaMaskUiCss()
@@ -21,7 +22,7 @@ async.parallel({
function connectToAccountManager (cb) {
// setup communication with background
- var pluginPort = chrome.runtime.connect({name: 'popup'})
+ var pluginPort = extension.runtime.connect({name: 'popup'})
var portStream = new PortStream(pluginPort)
// setup multiplexing
var mx = setupMultiplex(portStream)
@@ -55,8 +56,8 @@ function setupControllerConnection (stream, cb) {
function getCurrentDomain (cb) {
const unknown = '<unknown>'
- if (!chrome.tabs) return cb(null, unknown)
- chrome.tabs.query({active: true, currentWindow: true}, function (results) {
+ if (!extension.tabs) return cb(null, unknown)
+ extension.tabs.query({active: true, currentWindow: true}, function (results) {
var activeTab = results[0]
var currentUrl = activeTab && activeTab.url
var currentDomain = url.parse(currentUrl).host
@@ -68,9 +69,9 @@ function getCurrentDomain (cb) {
}
function clearNotifications(){
- chrome.notifications.getAll(function (object) {
+ extension.notifications.getAll(function (object) {
for (let notification in object){
- chrome.notifications.clear(notification)
+ extension.notifications.clear(notification)
}
})
}