summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2024-03-12 09:49:46 +0800
committerlittleblack111 <littleblack11111@gmail.com>2024-03-12 09:49:46 +0800
commit95af0f2f9274b56a24576c0521c9e27c6859635c (patch)
tree04ecd444686542c0b969361b5e0dcbafeffc7702 /public
parent84d27ca476894d25a39cac63fdf451aafe444776 (diff)
updated sw.js, testing for everytime load removing the items and restoring the newer one
Diffstat (limited to 'public')
-rw-r--r--public/sw.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/public/sw.js b/public/sw.js
index 3de310ae..29e785ad 100644
--- a/public/sw.js
+++ b/public/sw.js
@@ -1,5 +1,22 @@
"use strict";
+function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
+function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
+function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
+caches.keys().then(function (names) {
+ var _iterator = _createForOfIteratorHelper(names),
+ _step;
+ try {
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
+ var name = _step.value;
+ caches.delete(name);
+ }
+ } catch (err) {
+ _iterator.e(err);
+ } finally {
+ _iterator.f();
+ }
+});
var cacheName = 'cache-v1';
var resourceToPrecache = ['/', '/index.html', '/404.html', '/pages/info/about.html', '/pages/repo/github/repos.html', '/css/style.css', '/css/404.css', '/css/index.css', '/css/ghrepo.css', '/css/about.css', '/css/devicon.min.css', '/js/main.js', '/js/about.js', '/js/dynamicBlob.js', '/js/getrepo.js', '/js/hacktype.js', '/js/header.js', '/js/index.js', '/js/mouseblob.js', '/js/randomblob.js', '/js/rbg.js', '/js/tilt.conf.js', '/js/tilt.conf.noglare.js', '/js/tilt.js', '/js/2dtilt.js', '/fonts/Hacked-KerX.ttf', '/fonts/SmoothElegantRegular-ZLv3.ttf', '/fonts/LigaJetBrainsMonoNerdFont-Regular.ttf', '/fonts/Big500-8MLOM.ttf', '/fonts/Monoton.ttf', '/fonts/RockSalt-Regular.ttf', '/fonts/audiowide.ttf'];
self.addEventListener('install', function (event) {