diff options
author | frankiebee <frankie.diamond@gmail.com> | 2017-06-09 08:35:21 +0800 |
---|---|---|
committer | frankiebee <frankie.diamond@gmail.com> | 2017-06-09 08:36:21 +0800 |
commit | 3d1d38a2c0cd04d637b878d0a0be7f505f406a97 (patch) | |
tree | af92f61a93f4ecec6706871af20aa7de7665704d /mascara/src | |
parent | a0a19468a805994f3897a63489c344e5f3f89dc9 (diff) | |
download | tangerine-wallet-browser-3d1d38a2c0cd04d637b878d0a0be7f505f406a97.tar tangerine-wallet-browser-3d1d38a2c0cd04d637b878d0a0be7f505f406a97.tar.gz tangerine-wallet-browser-3d1d38a2c0cd04d637b878d0a0be7f505f406a97.tar.bz2 tangerine-wallet-browser-3d1d38a2c0cd04d637b878d0a0be7f505f406a97.tar.lz tangerine-wallet-browser-3d1d38a2c0cd04d637b878d0a0be7f505f406a97.tar.xz tangerine-wallet-browser-3d1d38a2c0cd04d637b878d0a0be7f505f406a97.tar.zst tangerine-wallet-browser-3d1d38a2c0cd04d637b878d0a0be7f505f406a97.zip |
reload page if ui is not present
Diffstat (limited to 'mascara/src')
-rw-r--r-- | mascara/src/ui.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/mascara/src/ui.js b/mascara/src/ui.js index e798847a7..5f9be542f 100644 --- a/mascara/src/ui.js +++ b/mascara/src/ui.js @@ -40,7 +40,6 @@ const connectApp = function (readSw) { }) }) } - background.on('ready', (sw) => { background.removeListener('updatefound', connectApp) connectApp(sw) @@ -48,5 +47,10 @@ background.on('ready', (sw) => { background.on('updatefound', () => window.location.reload()) background.startWorker() -// background.startWorker() +.then(() => { + setTimeout(() => { + const appContent = document.getElementById(`app-content`) + if (!appContent.children.length) window.location.reload() + }, 2000) +}) console.log('hello from MetaMascara ui!') |