Compare commits
2 Commits
665384257f
...
9b46411fa7
Author | SHA1 | Date |
---|---|---|
|
9b46411fa7 | |
|
8f416f54c7 |
|
@ -42,10 +42,10 @@ module.exports = class extends Component {
|
|||
<script src={url_for('/js/flying-pages.min.js')} defer={true}></script>
|
||||
<script src={url_for('/js/sw.js')} defer={true}></script>
|
||||
<script>
|
||||
var lazyLoadInstance = new LazyLoad({
|
||||
});
|
||||
var lazyLoadInstance = new LazyLoad({
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
</Fragment>;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "hexo-theme-amane",
|
||||
"version": "0.0.27",
|
||||
"version": "0.0.29",
|
||||
"author": "Nofated095 <nofated095@users.noreply.github.com>",
|
||||
"license": "MIT",
|
||||
"description": "A simple, delicate, and modern theme for Hexo",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
importScripts('https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/workbox-sw/5.1.4/workbox-sw.min.js');
|
||||
importScripts('https://cdn.staticfile.org/workbox-sw/5.1.4/workbox-sw.min.js');
|
||||
|
||||
workbox.setConfig({
|
||||
modulePathPrefix: 'https://cdn.jsdelivr.net/npm/workbox-cdn@5.1.4/workbox/'
|
||||
modulePathPrefix: 'https://cdn.staticfile.org/workbox-sw/5.1.4/'
|
||||
});
|
||||
|
||||
const { core, precaching, routing, strategies, expiration, cacheableResponse, backgroundSync } = workbox;
|
||||
|
@ -9,7 +9,7 @@ const { CacheFirst, NetworkFirst, NetworkOnly,StaleWhileRevalidate } = strategie
|
|||
const { ExpirationPlugin } = expiration;
|
||||
const { CacheableResponsePlugin } = cacheableResponse;
|
||||
|
||||
const cacheSuffixVersion = '-210929a',
|
||||
const cacheSuffixVersion = '-231119a',
|
||||
// precacheCacheName = core.cacheNames.precache,
|
||||
// runtimeCacheName = core.cacheNames.runtime,
|
||||
maxEntries = 100;
|
||||
|
@ -28,7 +28,7 @@ self.addEventListener('activate', (event) => {
|
|||
|
||||
|
||||
core.setCacheNameDetails({
|
||||
prefix: '186blog',
|
||||
prefix: 'amane',
|
||||
suffix: cacheSuffixVersion
|
||||
});
|
||||
|
||||
|
@ -97,40 +97,6 @@ routing.registerRoute(
|
|||
})
|
||||
);
|
||||
|
||||
routing.registerRoute(
|
||||
/.*littleskin\.cn/,
|
||||
new CacheFirst({
|
||||
cacheName: 'static-immutable' + cacheSuffixVersion,
|
||||
fetchOptions: {
|
||||
mode: 'cors',
|
||||
credentials: 'omit'
|
||||
},
|
||||
plugins: [
|
||||
new ExpirationPlugin({
|
||||
maxAgeSeconds: 30 * 24 * 60 * 60,
|
||||
purgeOnQuotaError: true
|
||||
})
|
||||
]
|
||||
})
|
||||
);
|
||||
|
||||
routing.registerRoute(
|
||||
/.*www\.bing\.com/,
|
||||
new CacheFirst({
|
||||
cacheName: 'static-immutable' + cacheSuffixVersion,
|
||||
fetchOptions: {
|
||||
mode: 'cors',
|
||||
credentials: 'omit'
|
||||
},
|
||||
plugins: [
|
||||
new ExpirationPlugin({
|
||||
maxAgeSeconds: 30 * 24 * 60 * 60,
|
||||
purgeOnQuotaError: true
|
||||
})
|
||||
]
|
||||
})
|
||||
);
|
||||
|
||||
routing.registerRoute(
|
||||
/.*cdn\.nofated\.win/,
|
||||
new CacheFirst({
|
||||
|
@ -149,7 +115,7 @@ routing.registerRoute(
|
|||
);
|
||||
|
||||
routing.registerRoute(
|
||||
/.*fonts\.googleapis\.com/,
|
||||
/.*fonts\.googleapis\.cn/,
|
||||
new CacheFirst({
|
||||
cacheName: 'static-immutable' + cacheSuffixVersion,
|
||||
fetchOptions: {
|
||||
|
@ -293,7 +259,7 @@ routing.registerRoute(
|
|||
* staleWhileRevalidate
|
||||
*/
|
||||
routing.registerRoute(
|
||||
'/sw.js',
|
||||
'/js/sw.js',
|
||||
StaleWhileRevalidateInstance
|
||||
);
|
||||
|
||||
|
@ -304,13 +270,6 @@ routing.registerRoute(
|
|||
StaleWhileRevalidateInstance
|
||||
);
|
||||
|
||||
routing.registerRoute(
|
||||
/.*blog\.nof\.moe/,
|
||||
StaleWhileRevalidateInstance
|
||||
);
|
||||
|
||||
|
||||
|
||||
routing.registerRoute(
|
||||
/.*localhost/,
|
||||
StaleWhileRevalidateInstance
|
||||
|
@ -322,11 +281,6 @@ routing.registerRoute(
|
|||
new NetworkOnly()
|
||||
);
|
||||
|
||||
routing.registerRoute(
|
||||
/.*img-shields-io\.186526\.xyz/,
|
||||
new NetworkOnly()
|
||||
);
|
||||
|
||||
/*
|
||||
* Default - Serve as it is
|
||||
* StaleWhileRevalidate
|
||||
|
|
Loading…
Reference in New Issue