1
0
mirror of https://github.com/ZeroCatDev/Classworks.git synced 2025-07-02 00:59:23 +00:00

deploy: 183214305540d86e56c34316ec52523d04af4ab2

This commit is contained in:
Sunwuyuan 2025-06-11 08:18:56 +00:00
parent 7a95b7fce7
commit 013e3f3ec5
2 changed files with 2 additions and 2 deletions

View File

@ -1 +1 @@
{"name":"Classworks作业板","short_name":"Classworks","description":"记录,查看并同步作业","start_url":"./","display":"standalone","background_color":"#212121","theme_color":"#212121","lang":"en","scope":"./","edge_side_panel":{"default_path":"./"},"icons":[{"src":"./pwa/image/pwa-64x64.png","sizes":"64x64","type":"image/png"},{"src":"./pwa/image/pwa-192x192.png","sizes":"192x192","type":"image/png"},{"src":"./pwa/image/pwa-512x512.png","sizes":"512x512","type":"image/png"},{"src":"./pwa/image/maskable-icon-512x512.png","sizes":"512x512","type":"image/png","purpose":"maskable"}],"shortcuts":[{"name":"随机点名","short_name":"随机点名","url":"./#random-picker","icons":[{"src":"./pwa/image/pwa-64x64.png","sizes":"64x64","type":"image/png"}]}]} {"name":"Classworks作业板","short_name":"Classworks","description":"记录,查看并同步作业","start_url":"./","display":"standalone","background_color":"#212121","theme_color":"#212121","lang":"en","scope":"./","edge_side_panel":{"default_path":"./"},"icons":[{"src":"./pwa/image/pwa-64x64.png","sizes":"64x64","type":"image/png"},{"src":"./pwa/image/pwa-192x192.png","sizes":"192x192","type":"image/png"},{"src":"./pwa/image/pwa-512x512.png","sizes":"512x512","type":"image/png"},{"src":"./pwa/image/maskable-icon-512x512.png","sizes":"512x512","type":"image/png","purpose":"maskable"}],"id":"classworks","shortcuts":[{"name":"随机点名","short_name":"随机点名","url":"./#random-picker","icons":[{"src":"./pwa/image/pwa-64x64.png","sizes":"64x64","type":"image/png"}]}]}

2
sw.js
View File

@ -1 +1 @@
if(!self.define){let e,a={};const s=(s,n)=>(s=new URL(s+".js",n).href,a[s]||new Promise((a=>{if("document"in self){const e=document.createElement("script");e.src=s,e.onload=a,document.head.appendChild(e)}else e=s,importScripts(s),a()})).then((()=>{let e=a[s];if(!e)throw new Error(`Module ${s} didnt register its module`);return e})));self.define=(n,i)=>{const c=e||("document"in self?document.currentScript.src:"")||location.href;if(a[c])return;let r={};const t=e=>s(e,c),o={module:{uri:c},exports:r,require:t};a[c]=Promise.all(n.map((e=>o[e]||t(e)))).then((e=>(i(...e),r)))}}define(["./workbox-9fa0a121"],(function(e){"use strict";importScripts("./sw-cache-manager.js"),e.enable(),self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"328a0e159cf9b3fb3caacaab9c83bf17.txt",revision:"17b71801596a3c100e47e94b2ceb820d"},{url:"favicon.ico",revision:"8e3a55390cf66d227f765a6063bb6c31"},{url:"index.html",revision:"093a3dd5d932f9b98c1a36908cc436a2"},{url:"manifest.webmanifest",revision:"b0b994b429676afc68d0e6f9fe77af13"},{url:"registerSW.js",revision:"402b66900e731ca748771b6fc5e7a068"},{url:"sw-cache-manager.js",revision:"e1c99eed8d27ad84cb5fc7c56efd223b"},{url:"pwa/image/maskable-icon-512x512.png",revision:"dfa412c4bbe0f716216ac5db7a4c706d"},{url:"pwa/image/pwa-192x192.png",revision:"81802c789e8b735f7f8b181f002932f8"},{url:"pwa/image/pwa-512x512.png",revision:"57cc60501279a6d172b32211b1c67688"},{url:"pwa/image/pwa-64x64.png",revision:"b4ca4c3d8333391f20cddbb3f6cca2df"},{url:"manifest.webmanifest",revision:"b0b994b429676afc68d0e6f9fe77af13"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html"))),e.registerRoute((({url:e,sameOrigin:a})=>a&&e.pathname.endsWith("/assets/")),new e.CacheFirst({cacheName:"assets-cache",plugins:[new e.ExpirationPlugin({maxEntries:200,maxAgeSeconds:5184e3}),new e.CacheableResponsePlugin({statuses:[0,200]})]}),"GET"),e.registerRoute((({url:e,sameOrigin:a})=>a&&e.pathname.startsWith("/pwa/")),new e.StaleWhileRevalidate({cacheName:"pwa-cache",plugins:[new e.ExpirationPlugin({maxEntries:50,maxAgeSeconds:604800}),new e.CacheableResponsePlugin({statuses:[0,200]})]}),"GET"),e.registerRoute((({url:e,sameOrigin:a})=>{if(!a)return!1;const s=e.pathname;return!(s.includes("/assets/")||s.includes("/pwa/"))}),new e.NetworkFirst({cacheName:"other-resources",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:100,maxAgeSeconds:86400}),new e.CacheableResponsePlugin({statuses:[0,200]})]}),"GET")})); if(!self.define){let e,s={};const a=(a,n)=>(a=new URL(a+".js",n).href,s[a]||new Promise((s=>{if("document"in self){const e=document.createElement("script");e.src=a,e.onload=s,document.head.appendChild(e)}else e=a,importScripts(a),s()})).then((()=>{let e=s[a];if(!e)throw new Error(`Module ${a} didnt register its module`);return e})));self.define=(n,i)=>{const c=e||("document"in self?document.currentScript.src:"")||location.href;if(s[c])return;let r={};const t=e=>a(e,c),o={module:{uri:c},exports:r,require:t};s[c]=Promise.all(n.map((e=>o[e]||t(e)))).then((e=>(i(...e),r)))}}define(["./workbox-9fa0a121"],(function(e){"use strict";importScripts("./sw-cache-manager.js"),e.enable(),self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"328a0e159cf9b3fb3caacaab9c83bf17.txt",revision:"17b71801596a3c100e47e94b2ceb820d"},{url:"favicon.ico",revision:"8e3a55390cf66d227f765a6063bb6c31"},{url:"index.html",revision:"093a3dd5d932f9b98c1a36908cc436a2"},{url:"manifest.webmanifest",revision:"44520b5302520dd26d7467320969861d"},{url:"registerSW.js",revision:"402b66900e731ca748771b6fc5e7a068"},{url:"sw-cache-manager.js",revision:"e1c99eed8d27ad84cb5fc7c56efd223b"},{url:"pwa/image/maskable-icon-512x512.png",revision:"dfa412c4bbe0f716216ac5db7a4c706d"},{url:"pwa/image/pwa-192x192.png",revision:"81802c789e8b735f7f8b181f002932f8"},{url:"pwa/image/pwa-512x512.png",revision:"57cc60501279a6d172b32211b1c67688"},{url:"pwa/image/pwa-64x64.png",revision:"b4ca4c3d8333391f20cddbb3f6cca2df"},{url:"manifest.webmanifest",revision:"44520b5302520dd26d7467320969861d"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html"))),e.registerRoute((({url:e,sameOrigin:s})=>s&&e.pathname.endsWith("/assets/")),new e.CacheFirst({cacheName:"assets-cache",plugins:[new e.ExpirationPlugin({maxEntries:200,maxAgeSeconds:5184e3}),new e.CacheableResponsePlugin({statuses:[0,200]})]}),"GET"),e.registerRoute((({url:e,sameOrigin:s})=>s&&e.pathname.startsWith("/pwa/")),new e.StaleWhileRevalidate({cacheName:"pwa-cache",plugins:[new e.ExpirationPlugin({maxEntries:50,maxAgeSeconds:604800}),new e.CacheableResponsePlugin({statuses:[0,200]})]}),"GET"),e.registerRoute((({url:e,sameOrigin:s})=>{if(!s)return!1;const a=e.pathname;return!(a.includes("/assets/")||a.includes("/pwa/"))}),new e.NetworkFirst({cacheName:"other-resources",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:100,maxAgeSeconds:86400}),new e.CacheableResponsePlugin({statuses:[0,200]})]}),"GET")}));