From 9cb600e17ab43f897abfd874d70ca72221437b9c Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Tue, 6 Sep 2016 10:24:31 -0700 Subject: Redirect to video in a new tab on fresh install. --- app/scripts/background.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'app') diff --git a/app/scripts/background.js b/app/scripts/background.js index 5dae8235f..91c09629c 100644 --- a/app/scripts/background.js +++ b/app/scripts/background.js @@ -35,6 +35,12 @@ function showUnconfirmedTx (txParams, txData, onTxDoneCb) { notification.show() } +// On first install, open a window to MetaMask website to how-it-works. + +chrome.runtime.onInstalled.addListener(function (object) { + chrome.tabs.create({url: 'https://metamask.io/#how-it-works'}) +}) + // // connect to other contexts // @@ -160,4 +166,3 @@ function getOldStyleData () { function setData (data) { window.localStorage[STORAGE_KEY] = JSON.stringify(data) } - -- cgit v1.2.3 From 50f0624ea800b0b763f577171e451495c16cd6e9 Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Tue, 6 Sep 2016 10:27:11 -0700 Subject: Replace chrome with generalized browser API. --- app/scripts/background.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app') diff --git a/app/scripts/background.js b/app/scripts/background.js index 91c09629c..21a5eea65 100644 --- a/app/scripts/background.js +++ b/app/scripts/background.js @@ -37,8 +37,8 @@ function showUnconfirmedTx (txParams, txData, onTxDoneCb) { // On first install, open a window to MetaMask website to how-it-works. -chrome.runtime.onInstalled.addListener(function (object) { - chrome.tabs.create({url: 'https://metamask.io/#how-it-works'}) +extension.runtime.onInstalled.addListener(function (object) { + extension.tabs.create({url: 'https://metamask.io/#how-it-works'}) }) // -- cgit v1.2.3