From 719d0f4ad5ba7da2b807641a2afdc969d74d913c Mon Sep 17 00:00:00 2001 From: frankiebee Date: Thu, 6 Apr 2017 18:56:13 +0200 Subject: Ping service worker to keep it from going idle --- mascara/src/ui.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'mascara/src/ui.js') diff --git a/mascara/src/ui.js b/mascara/src/ui.js index c4866867b..37bb043b8 100644 --- a/mascara/src/ui.js +++ b/mascara/src/ui.js @@ -18,10 +18,13 @@ const container = document.getElementById('app-content') var name = 'popup' window.METAMASK_UI_TYPE = name +let intervalDelay = Math.floor(Math.random() * (60000 - 1000)) + 1000 + const background = new SWcontroller({ fileName: '/background.js', + letBeIdel: false, + intervalDelay, }) - // Setup listener for when the service worker is read background.on('ready', (readSw) => { let connectionStream = SwStream({ -- cgit v1.2.3