Skip to content

Commit

Permalink
Update SW ES. N not allowed. :P
Browse files Browse the repository at this point in the history
  • Loading branch information
machawk1 committed Dec 13, 2017
1 parent fe67d4f commit 30ddaca
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions ipwb/serviceWorker.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-env serviceworker */

var baseDatetime = ''
let baseDatetime = ''

function getMyVersion () {
fetch(self.location.href)
Expand All @@ -18,19 +18,19 @@ self.addEventListener('activate', function (event) {
})

self.addEventListener('fetch', function (event) {
var request = event.request
let request = event.request

var url = new URL(event.request.url)
var isNavigation = event.request.mode === 'navigate'
var isWebUI = event.request.url.indexOf('/webui/') !== -1
var isDaemon = event.request.url.indexOf('/daemon/') !== -1
var isConfig = event.request.url.indexOf('/config/') !== -1
var isReplayRoot = (url.pathname === '/' || url.pathname === '')
var isRootMemento = event.request.url === event.request.referrer
const url = new URL(event.request.url)
const isNavigation = event.request.mode === 'navigate'
const isWebUI = event.request.url.indexOf('/webui/') !== -1
const isDaemon = event.request.url.indexOf('/daemon/') !== -1
const isConfig = event.request.url.indexOf('/config/') !== -1
const isReplayRoot = (url.pathname === '/' || url.pathname === '')
const isRootMemento = event.request.url === event.request.referrer
//var isAMemento = event.request.url.indexOf('/memento/') !== -1 || event.request.url.match('\/[0-9]{14}\/') !== null
var isAMemento = event.request.url.match('\/[0-9]{14}\/') !== null
const isAMemento = event.request.url.match('\/[0-9]{14}\/') !== null

var referrerDatetime = event.request.referrer.match(/\/([0-9]{14})\//)
let referrerDatetime = event.request.referrer.match(/\/([0-9]{14})\//)
if (referrerDatetime !== null) {
referrerDatetime = referrerDatetime[1]
}
Expand Down

0 comments on commit 30ddaca

Please sign in to comment.