-
Notifications
You must be signed in to change notification settings - Fork 40
/
service-worker.js
1 lines (1 loc) · 8.58 KB
/
service-worker.js
1
"use strict";function setOfCachedUrls(e){return e.keys().then(function(e){return e.map(function(e){return e.url})}).then(function(e){return new Set(e)})}var precacheConfig=[["/index.html","c18892c85ab01f74796c2a6c8c84b88d"],["/static/css/app.8e530ddb7ff99c165d00fa62cc3ae163.css","6627f35e50a175bf047b1892c5a1bdcb"],["/static/js/0.2ebd3ff8aa98fa0d5e1a.js","cba3658dcbe509466f4b097d44f3d40b"],["/static/js/1.d3e371940ae64b86a25a.js","7132c12cfe7e02e3b3dabb20b70e596a"],["/static/js/app.e11650e257d7533afcd6.js","dff9a73f9cc2cfd8fd990534e1c39f81"],["/static/js/manifest.6219e3879315d4739b5d.js","4399dd51eeb2e91b2be999b69496fd1e"],["/static/js/vendor.58ac3509b8e61385d0e8.js","d35230c5cd297769ca5356a1588d09ea"],["posts/2016/R-level-on-page-hide.md","e49bea30a5d9f46f5df7cde08322790e"],["posts/2016/how-to-make-a-chinese-checkers-with-js-and-canvas.md","c466d20aac1bf28a1b3343e398628872"],["posts/2016/js中this的一些总结.md","4f3eae19e4dd338be06659b8072008f9"],["posts/2016/实践DllPlugin优化webpack打包速度.md","c7da82c3ee22d858498507e0bc6449f8"],["posts/2016/排序算法小结.md","b752a12b736918abec07c2ab029217c9"],["posts/2016/移动端前端开发真机调试攻略.md","f0a001af034657678c203a774c0a114d"],["posts/2017/pack-your-nw-app-and-setup-files.md","1fc33bb33d35eac6dbada644257516cc"],["posts/2017/use-innosetup-to-build-a-beautiful-installation-interface.md","2e3e241db54dd3565d81bc089b5f75f9"],["posts/2017/vuejs-webpack-nwjs-2.md","65cedbb7f8cd2a15df1d7c4a1e27d947"],["posts/2017/vuejs-webpack-nwjs.md","3a8c0fa5fb4f8bef393b6443cd8c577b"],["posts/list.json","37082d3bbc037e4557dc03ac3d270427"],["posts/other/8月末尾来篇技术性的总结.md","11facce003db4e7e0e15a9a5d406324b"],["posts/other/CSS选择器详解.md","6109e12cb15785c3a20623c1cd652398"],["posts/other/Mac下的svn常用命令摘录.md","5fd97e6499770f8599f37f27ed553eda"],["posts/other/Who fucking car.md","842862c9d6abea966a63b2e3593b7ebe"],["posts/other/css3的calc()可直接在css中进行运算.md","97f1cca487c8534c44270272d5f645ed"],["posts/other/ctf比赛小记.md","cbdd8e801e002587b0533b1eae9c3fad"],["posts/other/test.md","8ceefa87da37adfe43a1aee4b1763dc4"],["posts/other/今天我把win7默默的更新了.md","ebbd23369691ade03330c4a164ddbeb5"],["posts/other/今天来填坑.md","36ad6274b3321354c90d905715442e6b"],["posts/other/今天起床迟了.md","dce86bb511a121f95819b8ce31e6eb22"],["posts/other/你可以装作知道我在说什么好么?.md","bb9e380d88ab5b5852cbbfa4f4a90a75"],["posts/other/写个知乎的外挂 - 用Chrome扩展程序的方式.md","2166b8d80e89ea687d32241e7045b0ae"],["posts/other/前几天刚好偶遇了一个机会.md","8905d6316ecb2f10034911c0f9545da0"],["posts/other/前来填坑-demo主站的自适应.md","91880a269d4c47c90c4f9c75fdaae71b"],["posts/other/前端路上.md","a1f5e6bb6950003b362054281f0ede2d"],["posts/other/动态添加的dom节点的行内事件无效.md","7f18c1645de055bb66310c6c45bdec0f"],["posts/other/奋斗的小孩.md","2edd79ec072edf81c7d312fac6b3f402"],["posts/other/就在刚刚我发现了一个励志的歌.md","a7a5df022edc4f6fe5f684118df4dfa8"],["posts/other/忽然明白今天竟然不是今天.md","e6625ed29d9bd496c10c3350f785f9c0"],["posts/other/慎用id、class名,免得被广告插件屏蔽.md","950a8723ae5a809fe8978394d58e2e44"],["posts/other/我先把我的一部分主页demo放出来算了.md","69edb44a674a13f943719bb71d86d7d7"],["posts/other/我准备把demo站点迁移到万网搞活动送的免费虚拟主机上去.md","3eeea2d42cfcfbee48ae0d5044587515"],["posts/other/我宁愿早起,也不愿做拖拉机!.md","230f9d17ad9a2df65f8952879b4caa35"],["posts/other/我有时候用.md","1411edf5c43d81a39b2d60a5bd878c9f"],["posts/other/我来开源一个小巧精悍的ngTinyEditor(基于angular).md","fcf1d716931a354562fb483f1d4045a8"],["posts/other/我踩到的angularjs的坑.md","a630b94be99995e858c7bb959cebc25e"],["posts/other/拖拉机就是没有没有执行力的意思.md","03b4e02f1bd2a5407ff9fb06c714b003"],["posts/other/更新一下关于这两天招新的东西.md","e0931b86341114179e2fca32aefd3b6d"],["posts/other/最近又要更新我的demo首页.md","2248d97964156d78cec9aeaa47c12b57"],["posts/other/最近的demo,以及技术总结.md","47022b5f7eec977a3079c7234a650204"],["posts/other/来一篇曾经关于我的文章[“安贱”语录]又名[安子语类].md","c3798530e2f4fd1476d44b2a43cfc9c4"],["posts/other/标题党想不出标题.md","ae943930d7d13c9a4230971d9db3e39c"],["posts/other/牛逼的我.md","9812c1360e1525635a51d2b9235ff007"],["posts/other/真是一次有意义的通宵.md","6fd0b336b926b71f82dbad0840367f44"],["posts/other/答一友短信书.md","5932f74bc92789a5118695ebaac0187c"],["posts/other/荒芜的青草蔓延.md","d58270d3d9dac2d5238dc70ef176a333"],["posts/other/装逼.md","ff7254c2638c3c6c86342990369e3f7d"],["posts/other/解决chrome document.documentElement.scrollTop问题.md","2d1ce6eb66553501bf383c22820a809a"],["posts/other/说好的情怀.md","196a347aa3007588247364fa3e824ae8"],["posts/other/这个周末重做了我的demo主站.md","6d6830dec6a651cca1a8cd02e6fbdaac"],["posts/other/这几天做了几个页面,可忙坏我这个新手了.md","af8ea7708555a14e9d61b5834471ae5b"],["posts/other/阳光明媚的下午和阴暗潮湿的一楼寝室.md","0ac35fdabc1c212f98a7c6b66337774d"],["static/css/app.8e530ddb7ff99c165d00fa62cc3ae163.css","6627f35e50a175bf047b1892c5a1bdcb"],["static/favicon.ico","8b208e6e873b4be779260ab48666363e"],["static/imgs/logo-square.png","19df54dbe485b22198b28f3f48cffaef"],["static/imgs/[email protected]","bc944c8d5761537b4a4b914c20d46dae"],["static/js/0.2ebd3ff8aa98fa0d5e1a.js","cba3658dcbe509466f4b097d44f3d40b"],["static/js/1.d3e371940ae64b86a25a.js","7132c12cfe7e02e3b3dabb20b70e596a"],["static/js/app.8eb6c7dc5b5287b99f5f.js","456454246588c0a8131117de49c02e79"],["static/js/app.e11650e257d7533afcd6.js","dff9a73f9cc2cfd8fd990534e1c39f81"],["static/js/manifest.6219e3879315d4739b5d.js","4399dd51eeb2e91b2be999b69496fd1e"],["static/js/manifest.cd5c4638ef692f52a795.js","762750971ac744d15df33a786f7b82a0"],["static/js/vendor.58ac3509b8e61385d0e8.js","d35230c5cd297769ca5356a1588d09ea"]],cacheName="sw-precache-v3-blog-"+(self.registration?self.registration.scope:""),ignoreUrlParametersMatching=[/^utm_/],addDirectoryIndex=function(e,a){var t=new URL(e);return"/"===t.pathname.slice(-1)&&(t.pathname+=a),t.toString()},cleanResponse=function(e){return e.redirected?("body"in e?Promise.resolve(e.body):e.blob()).then(function(a){return new Response(a,{headers:e.headers,status:e.status,statusText:e.statusText})}):Promise.resolve(e)},createCacheKey=function(e,a,t,s){var c=new URL(e);return s&&c.pathname.match(s)||(c.search+=(c.search?"&":"")+encodeURIComponent(a)+"="+encodeURIComponent(t)),c.toString()},isPathWhitelisted=function(e,a){if(0===e.length)return!0;var t=new URL(a).pathname;return e.some(function(e){return t.match(e)})},stripIgnoredUrlParameters=function(e,a){var t=new URL(e);return t.hash="",t.search=t.search.slice(1).split("&").map(function(e){return e.split("=")}).filter(function(e){return a.every(function(a){return!a.test(e[0])})}).map(function(e){return e.join("=")}).join("&"),t.toString()},hashParamName="_sw-precache",urlsToCacheKeys=new Map(precacheConfig.map(function(e){var a=e[0],t=e[1],s=new URL(a,self.location),c=createCacheKey(s,hashParamName,t,!1);return[s.toString(),c]}));self.addEventListener("install",function(e){e.waitUntil(caches.open(cacheName).then(function(e){return setOfCachedUrls(e).then(function(a){return Promise.all(Array.from(urlsToCacheKeys.values()).map(function(t){if(!a.has(t)){var s=new Request(t,{credentials:"same-origin"});return fetch(s).then(function(a){if(!a.ok)throw new Error("Request for "+t+" returned a response with status "+a.status);return cleanResponse(a).then(function(a){return e.put(t,a)})})}}))})}).then(function(){return self.skipWaiting()}))}),self.addEventListener("activate",function(e){var a=new Set(urlsToCacheKeys.values());e.waitUntil(caches.open(cacheName).then(function(e){return e.keys().then(function(t){return Promise.all(t.map(function(t){if(!a.has(t.url))return e.delete(t)}))})}).then(function(){return self.clients.claim()}))}),self.addEventListener("fetch",function(e){if("GET"===e.request.method){var a,t=stripIgnoredUrlParameters(e.request.url,ignoreUrlParametersMatching);(a=urlsToCacheKeys.has(t))||(t=addDirectoryIndex(t,"index.html"),a=urlsToCacheKeys.has(t));a&&e.respondWith(caches.open(cacheName).then(function(e){return e.match(urlsToCacheKeys.get(t)).then(function(e){if(e)return e;throw Error("The cached response that was expected is missing.")})}).catch(function(a){return console.warn('Couldn\'t serve response for "%s" from cache: %O',e.request.url,a),fetch(e.request)}))}});