aboutsummaryrefslogtreecommitdiffstats
path: root/library/src/popup.js
diff options
context:
space:
mode:
authorfrankiebee <frankie.diamond@gmail.com>2017-04-03 13:01:44 +0800
committerfrankiebee <frankie.diamond@gmail.com>2017-04-03 13:01:44 +0800
commit8d49d519c090d287484008346aba1df6d7ad77e7 (patch)
treea4064ac0a05429c591e6776bf496c803d1819ae9 /library/src/popup.js
parent29a602a89b176e7af3f15297c2f586a4ece0a726 (diff)
downloadtangerine-wallet-browser-8d49d519c090d287484008346aba1df6d7ad77e7.tar.gz
tangerine-wallet-browser-8d49d519c090d287484008346aba1df6d7ad77e7.tar.zst
tangerine-wallet-browser-8d49d519c090d287484008346aba1df6d7ad77e7.zip
Rename and move around files
Diffstat (limited to 'library/src/popup.js')
-rw-r--r--library/src/popup.js29
1 files changed, 29 insertions, 0 deletions
diff --git a/library/src/popup.js b/library/src/popup.js
new file mode 100644
index 000000000..3dcc508bf
--- /dev/null
+++ b/library/src/popup.js
@@ -0,0 +1,29 @@
+const injectCss = require('inject-css')
+const MetaMaskUiCss = require('../../ui/css')
+const setupIframe = require('./lib/setup-iframe.js')
+const MetamaskInpageProvider = require('../../app/scripts/lib/inpage-provider.js')
+const SWcontroller = require('client-sw-ready-event/lib/sw-client.js')
+const SwStream = require('sw-stream/lib/sw-stream.js')
+const startPopup = require('../../app/scripts/popup-core')
+
+
+var css = MetaMaskUiCss()
+injectCss(css)
+
+var name = 'popup'
+window.METAMASK_UI_TYPE = name
+
+console.log('outside:open')
+
+const background = new SWcontroller({
+ fileName: '/popup/sw-build.js',
+})
+background.on('ready', (readSw) => {
+ let swStream = SwStream({
+ serviceWorker: background.controller,
+ })
+ startPopup(swStream)
+})
+
+background.startWorker()
+console.log('hello from /library/popup.js')