aboutsummaryrefslogtreecommitdiffstats
path: root/mascara/src/ui.js
diff options
context:
space:
mode:
authorfrankiebee <frankie.diamond@gmail.com>2017-04-28 20:05:10 +0800
committerfrankiebee <frankie.diamond@gmail.com>2017-04-28 20:12:25 +0800
commit36bafbaebf826933262c4ad381a8953e82f8ebc3 (patch)
tree87203d73e7f44720ad25f8d7acf49e732516b5db /mascara/src/ui.js
parent53537824f179038d227c9a340302d039ab151ede (diff)
downloadtangerine-wallet-browser-36bafbaebf826933262c4ad381a8953e82f8ebc3.tar
tangerine-wallet-browser-36bafbaebf826933262c4ad381a8953e82f8ebc3.tar.gz
tangerine-wallet-browser-36bafbaebf826933262c4ad381a8953e82f8ebc3.tar.bz2
tangerine-wallet-browser-36bafbaebf826933262c4ad381a8953e82f8ebc3.tar.lz
tangerine-wallet-browser-36bafbaebf826933262c4ad381a8953e82f8ebc3.tar.xz
tangerine-wallet-browser-36bafbaebf826933262c4ad381a8953e82f8ebc3.tar.zst
tangerine-wallet-browser-36bafbaebf826933262c4ad381a8953e82f8ebc3.zip
General cleanup and window reload if an update is found
Diffstat (limited to 'mascara/src/ui.js')
-rw-r--r--mascara/src/ui.js13
1 files changed, 3 insertions, 10 deletions
diff --git a/mascara/src/ui.js b/mascara/src/ui.js
index 07763cc5e..65a55ccc3 100644
--- a/mascara/src/ui.js
+++ b/mascara/src/ui.js
@@ -46,15 +46,8 @@ background.on('ready', (sw) => {
background.removeListener('updatefound', connectApp)
connectApp(sw)
})
-background.on('updatefound', () => background.serviceWorkerApi.ready
- .then((sw) =>{
- background.removeListener('ready', connectApp)
- connectApp(sw.active)
- })
-)
-background.on('message', (messageEvent) => {
- console.log(messageEvent)
-})
-window.addEventListener('load', () => background.startWorker())
+background.on('updatefound', () => window.location.reload())
+
+background.startWorker()
// background.startWorker()
console.log('hello from MetaMascara ui!')