From a08c3bc01b11fbd0e3a243359befbe9fc909edf4 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Tue, 21 Jun 2016 13:18:32 -0700 Subject: Auto linted --- app/scripts/popup.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'app/scripts/popup.js') diff --git a/app/scripts/popup.js b/app/scripts/popup.js index 4fa6e1127..9e4051d05 100644 --- a/app/scripts/popup.js +++ b/app/scripts/popup.js @@ -19,7 +19,7 @@ async.parallel({ accountManager: connectToAccountManager, }, setupApp) -function connectToAccountManager(cb){ +function connectToAccountManager (cb) { // setup communication with background var pluginPort = chrome.runtime.connect({name: 'popup'}) var portStream = new PortStream(pluginPort) @@ -30,7 +30,7 @@ function connectToAccountManager(cb){ setupWeb3Connection(mx.createStream('provider')) } -function setupWeb3Connection(stream){ +function setupWeb3Connection (stream) { var remoteProvider = new StreamProvider() remoteProvider.pipe(stream).pipe(remoteProvider) stream.on('error', console.error.bind(console)) @@ -38,23 +38,23 @@ function setupWeb3Connection(stream){ global.web3 = new Web3(remoteProvider) } -function setupControllerConnection(stream, cb){ +function setupControllerConnection (stream, cb) { var eventEmitter = new EventEmitter() var background = Dnode({ - sendUpdate: function(state){ + sendUpdate: function (state) { eventEmitter.emit('update', state) }, }) stream.pipe(background).pipe(stream) - background.once('remote', function(accountManager){ + background.once('remote', function (accountManager) { // setup push events accountManager.on = eventEmitter.on.bind(eventEmitter) cb(null, accountManager) }) } -function getCurrentDomain(cb){ - chrome.tabs.query({active: true, currentWindow: true}, function(results){ +function getCurrentDomain (cb) { + chrome.tabs.query({active: true, currentWindow: true}, function (results) { var activeTab = results[0] var currentUrl = activeTab && activeTab.url var currentDomain = url.parse(currentUrl).host @@ -65,7 +65,7 @@ function getCurrentDomain(cb){ }) } -function setupApp(err, opts){ +function setupApp (err, opts) { if (err) { alert(err.stack) throw err -- cgit