From 56db3999adeaec1733218173b260bf74fa63ccbe Mon Sep 17 00:00:00 2001 From: kumavis Date: Wed, 13 Sep 2017 16:45:31 -0700 Subject: tests - start migrating mascara tests to karma --- mascara/src/ui.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'mascara/src') diff --git a/mascara/src/ui.js b/mascara/src/ui.js index 5f9be542f..5662270c1 100644 --- a/mascara/src/ui.js +++ b/mascara/src/ui.js @@ -44,13 +44,18 @@ background.on('ready', (sw) => { background.removeListener('updatefound', connectApp) connectApp(sw) }) -background.on('updatefound', () => window.location.reload()) +background.on('updatefound', windowReload) background.startWorker() .then(() => { setTimeout(() => { const appContent = document.getElementById(`app-content`) - if (!appContent.children.length) window.location.reload() + if (!appContent.children.length) windowReload() }, 2000) }) console.log('hello from MetaMascara ui!') + +function windowReload() { + if (window.METAMASK_SKIP_RELOAD) return + window.location.reload() +} -- cgit v1.2.3