aboutsummaryrefslogblamecommitdiffstats
path: root/library/popup.js
blob: a9d934c433564bd13a678b30d2b096ada28a007f (plain) (tree)
1
2
3
4
5
6
7

                                          
                                                    



                                                                               







                              
                           
 





                                                                                     



                                         
  
                                                      

                                           
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('./sw-controller')
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) => {
  // var inpageProvider = new MetamaskInpageProvider(SwStream(background.controller))
  // startPopup(inpageProvider)
  swStream = SwStream({
    serviceWorker: background.controller,
    })
  startPopup()
})
background.on('message', (messageEvent) => {debugger})
background.startWorker()
console.log('hello from /library/popup.js')