diff --git a/docs/demo.html b/docs/demo.html deleted file mode 100644 index 126e91e..0000000 --- a/docs/demo.html +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - 这是一个可以安装到桌面的网页 - - - - - - - - -

点击

- - - - - \ No newline at end of file diff --git a/docs/logo.png b/docs/logo.png deleted file mode 100644 index 7d2b9bc..0000000 Binary files a/docs/logo.png and /dev/null differ diff --git a/docs/main.css b/docs/main.css deleted file mode 100644 index 808d4d6..0000000 --- a/docs/main.css +++ /dev/null @@ -1,3 +0,0 @@ -h3{ - color: #f00; -} \ No newline at end of file diff --git a/docs/manifest.json b/docs/manifest.json deleted file mode 100644 index d016cfa..0000000 --- a/docs/manifest.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "short_name": "190桌面系统", - "name": "190桌面系统", - "description": "这是一个测试网页 ©iml6yu", - "icons": [ - { - "src": "logo.png", - "type": "image/png", - "sizes": "66x58" - } - ], - "start_url": "demo.html", - "background_color": "#3f51b5", - "display": "standalone", - "theme_color": "#3f51b5" -} \ No newline at end of file diff --git a/docs/service-worker.js b/docs/service-worker.js deleted file mode 100644 index 61e5e5a..0000000 --- a/docs/service-worker.js +++ /dev/null @@ -1 +0,0 @@ -importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js"),self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()})),workbox.core.clientsClaim(),self.__precacheManifest=[].concat(self.__precacheManifest||[]),workbox.precaching.precacheAndRoute(self.__precacheManifest,{}),workbox.routing.registerNavigationRoute(workbox.precaching.getCacheKeyForURL("./demo.html"),{blacklist:[/^\/_/,/\/[^\/]+\.[^\/]+$/]}); \ No newline at end of file diff --git a/docs/sw.js b/docs/sw.js deleted file mode 100644 index cc36d25..0000000 --- a/docs/sw.js +++ /dev/null @@ -1 +0,0 @@ -importScripts("./service-worker.js");var cacheStorageKey="190pwa",cacheList=["/","./demo.html","./main.css","./logo.png"];self.addEventListener("install",(e=>{e.waitUntil(caches.open(cacheStorageKey).then((e=>e?.addAll?.(cacheList))).then((()=>self.skipWaiting())))})),self.addEventListener("fetch",(function(e){e.respondWith(caches.match(e.request).then((function(t){return null!=t?t:fetch(e.request.url)})))})),self.addEventListener("activate",(function(e){e.waitUntil(caches.keys().then((e=>Promise.all(e.filter((e=>e!==cacheStorageKey)).map((e=>caches.delete(e)))))).then((()=>self.clients.claim())))})); \ No newline at end of file diff --git a/public/demo.html b/public/demo.html deleted file mode 100644 index ff81851..0000000 --- a/public/demo.html +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - 这是一个可以安装到桌面的网页 - - - - - - - - -

点击

- - - - - \ No newline at end of file diff --git a/public/logo.png b/public/logo.png deleted file mode 100644 index 7d2b9bc..0000000 Binary files a/public/logo.png and /dev/null differ diff --git a/public/main.css b/public/main.css deleted file mode 100644 index 808d4d6..0000000 --- a/public/main.css +++ /dev/null @@ -1,3 +0,0 @@ -h3{ - color: #f00; -} \ No newline at end of file diff --git a/public/manifest.json b/public/manifest.json deleted file mode 100644 index d016cfa..0000000 --- a/public/manifest.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "short_name": "190桌面系统", - "name": "190桌面系统", - "description": "这是一个测试网页 ©iml6yu", - "icons": [ - { - "src": "logo.png", - "type": "image/png", - "sizes": "66x58" - } - ], - "start_url": "demo.html", - "background_color": "#3f51b5", - "display": "standalone", - "theme_color": "#3f51b5" -} \ No newline at end of file diff --git a/public/service-worker.js b/public/service-worker.js deleted file mode 100644 index 475f474..0000000 --- a/public/service-worker.js +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Welcome to your Workbox-powered service worker! - * - * You'll need to register this file in your web app and you should - * disable HTTP caching for this file too. - * See https://goo.gl/nhQhGp - * - * The rest of the code is auto-generated. Please don't update this file - * directly; instead, make changes to your Workbox build configuration - * and re-run your build process. - * See https://goo.gl/2aRDsh - */ - -importScripts( - "https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js" -); - -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 - * requests for URLs in the manifest. - * See https://goo.gl/S9QRab - */ -self.__precacheManifest = [].concat(self.__precacheManifest || []); -workbox.precaching.precacheAndRoute(self.__precacheManifest, {}); - -workbox.routing.registerNavigationRoute( - workbox.precaching.getCacheKeyForURL("./demo.html"), - { - blacklist: [/^\/_/, /\/[^\/]+\.[^\/]+$/], - } -); diff --git a/public/sw.js b/public/sw.js deleted file mode 100644 index a136632..0000000 --- a/public/sw.js +++ /dev/null @@ -1,43 +0,0 @@ -importScripts("./service-worker.js"); -var cacheStorageKey = "190pwa"; -var cacheList = ["/", "./demo.html", "./main.css", "./logo.png"]; -self.addEventListener("install", (e) => { - e.waitUntil( - caches - .open(cacheStorageKey) - .then((cache) => cache?.addAll?.(cacheList)) - .then(() => self.skipWaiting()) - ); -}); -self.addEventListener("fetch", function (e) { - e.respondWith( - caches.match(e.request).then(function (response) { - if (response != null) { - return response; - } - return fetch(e.request.url); - }) - ); -}); -self.addEventListener("activate", function (e) { - e.waitUntil( - //获取所有cache名称 - caches - .keys() - .then((cacheNames) => { - return Promise.all( - // 获取所有不同于当前版本名称cache下的内容 - cacheNames - .filter((cacheNames) => { - return cacheNames !== cacheStorageKey; - }) - .map((cacheNames) => { - return caches.delete(cacheNames); - }) - ); - }) - .then(() => { - return self.clients.claim(); - }) - ); -});