mirror of
https://github.com/PeWu/topola-viewer.git
synced 2026-03-14 03:23:46 +00:00
Updates
This commit is contained in:
@@ -11,13 +11,19 @@
|
||||
* See https://goo.gl/2aRDsh
|
||||
*/
|
||||
|
||||
importScripts("https://storage.googleapis.com/workbox-cdn/releases/3.6.3/workbox-sw.js");
|
||||
importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js");
|
||||
|
||||
importScripts(
|
||||
"/topola-viewer/precache-manifest.66d8df4499b193362e166a516cfd5aaf.js"
|
||||
"/topola-viewer/precache-manifest.4ea4a9f80593c895a39c979b55761855.js"
|
||||
);
|
||||
|
||||
workbox.clientsClaim();
|
||||
self.addEventListener('message', (event) => {
|
||||
if (event.data && event.data.type === 'SKIP_WAITING') {
|
||||
self.skipWaiting();
|
||||
}
|
||||
});
|
||||
|
||||
workbox.core.clientsClaim();
|
||||
|
||||
/**
|
||||
* The workboxSW.precacheAndRoute() method efficiently caches and responds to
|
||||
@@ -25,10 +31,9 @@ workbox.clientsClaim();
|
||||
* See https://goo.gl/S9QRab
|
||||
*/
|
||||
self.__precacheManifest = [].concat(self.__precacheManifest || []);
|
||||
workbox.precaching.suppressWarnings();
|
||||
workbox.precaching.precacheAndRoute(self.__precacheManifest, {});
|
||||
|
||||
workbox.routing.registerNavigationRoute("/topola-viewer/index.html", {
|
||||
workbox.routing.registerNavigationRoute(workbox.precaching.getCacheKeyForURL("/topola-viewer/index.html"), {
|
||||
|
||||
blacklist: [/^\/_/,/\/[^\/]+\.[^\/]+$/],
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user