aboutsummaryrefslogtreecommitdiffstats
path: root/mascara/src/proxy.js
diff options
context:
space:
mode:
Diffstat (limited to 'mascara/src/proxy.js')
-rw-r--r--mascara/src/proxy.js25
1 files changed, 0 insertions, 25 deletions
diff --git a/mascara/src/proxy.js b/mascara/src/proxy.js
deleted file mode 100644
index 80b4dc516..000000000
--- a/mascara/src/proxy.js
+++ /dev/null
@@ -1,25 +0,0 @@
-const createParentStream = require('iframe-stream').ParentStream
-const SwController = require('sw-controller')
-const SwStream = require('sw-stream/lib/sw-stream.js')
-
-const keepAliveDelay = Math.floor(Math.random() * (30000 - 1000)) + 1000
-const background = new SwController({
- fileName: './scripts/background.js',
- keepAlive: true,
- keepAliveInterval: 30000,
- keepAliveDelay,
-})
-
-const pageStream = createParentStream()
-background.on('ready', () => {
- const swStream = SwStream({
- serviceWorker: background.controller,
- context: 'dapp',
- })
- pageStream.pipe(swStream).pipe(pageStream)
-
-})
-background.on('updatefound', () => window.location.reload())
-
-background.on('error', console.error)
-background.startWorker()