Handle page resizes on history, bumped to v12
This commit is contained in:
parent
7002a00972
commit
9c07611f95
6 changed files with 108 additions and 195 deletions
|
|
@ -6,6 +6,7 @@ const CACHED_ASSETS = [
|
|||
'/css/{{ .VERSION }}/main.css',
|
||||
'/css/{{ .VERSION }}/markdown.css',
|
||||
'/css/{{ .VERSION }}/notes2.css',
|
||||
'/css/{{ .VERSION }}/page_history.css',
|
||||
'/css/{{ .VERSION }}/theme.css',
|
||||
|
||||
'/images/{{ .VERSION }}/collapsed.svg',
|
||||
|
|
@ -119,9 +120,13 @@ self.addEventListener('activate', event => {
|
|||
})
|
||||
|
||||
self.addEventListener('fetch', event => {
|
||||
// console.debug('SERVICE WORKER: fetch', event.request.url)
|
||||
// The fetch event is also seeing requests to other domains.
|
||||
// Just let the browser handle those for itself.
|
||||
const ourDomain = event.request.url.startsWith(self.location.origin)
|
||||
if (!ourDomain)
|
||||
return event
|
||||
|
||||
if ({{ .DevMode }})
|
||||
if (`{{ .DevMode }}` == 'true')
|
||||
return event
|
||||
|
||||
event.respondWith(fetchAsset(event))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue