From 79174166b7bc6be185f134ff920f36db5695d8f0 Mon Sep 17 00:00:00 2001 From: cxzlw Date: Thu, 5 Oct 2023 01:15:44 +0800 Subject: [PATCH] Site updated: 2023-10-05 01:15:44 --- 2023/07/05/trace-of-line-01/index.html | 2 +- 2023/07/05/zhihu-aac-old/index.html | 2 +- 2023/07/06/zerotier-planet-convert/index.html | 2 +- 2023/07/10/trace-of-line-02/index.html | 2 +- .../permission-system-design-share/index.html | 2 +- 2023/08/04/test-latex/index.html | 2 +- 2023/08/31/cell-structure/index.html | 2 +- 2023/10/03/busuanzi-bug/index.html | 2 +- about/index.html | 2 +- js/statistics.js | 40 +++++++++++++++++-- sitemap.xml | 18 ++++----- sw.js | 2 +- 12 files changed, 56 insertions(+), 22 deletions(-) diff --git a/2023/07/05/trace-of-line-01/index.html b/2023/07/05/trace-of-line-01/index.html index 6a1cb2f..ca21494 100644 --- a/2023/07/05/trace-of-line-01/index.html +++ b/2023/07/05/trace-of-line-01/index.html @@ -24,7 +24,7 @@ - + diff --git a/2023/07/05/zhihu-aac-old/index.html b/2023/07/05/zhihu-aac-old/index.html index 0b3b259..398d8d5 100644 --- a/2023/07/05/zhihu-aac-old/index.html +++ b/2023/07/05/zhihu-aac-old/index.html @@ -25,7 +25,7 @@ - + diff --git a/2023/07/06/zerotier-planet-convert/index.html b/2023/07/06/zerotier-planet-convert/index.html index cc7e811..ae1760e 100644 --- a/2023/07/06/zerotier-planet-convert/index.html +++ b/2023/07/06/zerotier-planet-convert/index.html @@ -24,7 +24,7 @@ - + diff --git a/2023/07/10/trace-of-line-02/index.html b/2023/07/10/trace-of-line-02/index.html index 9c6e8b5..fdb7e01 100644 --- a/2023/07/10/trace-of-line-02/index.html +++ b/2023/07/10/trace-of-line-02/index.html @@ -24,7 +24,7 @@ - + diff --git a/2023/08/04/permission-system-design-share/index.html b/2023/08/04/permission-system-design-share/index.html index 98cdc42..b3ee781 100644 --- a/2023/08/04/permission-system-design-share/index.html +++ b/2023/08/04/permission-system-design-share/index.html @@ -24,7 +24,7 @@ - + diff --git a/2023/08/04/test-latex/index.html b/2023/08/04/test-latex/index.html index 027d9ce..a5c96f7 100644 --- a/2023/08/04/test-latex/index.html +++ b/2023/08/04/test-latex/index.html @@ -24,7 +24,7 @@ - + diff --git a/2023/08/31/cell-structure/index.html b/2023/08/31/cell-structure/index.html index 7addf48..edaee88 100644 --- a/2023/08/31/cell-structure/index.html +++ b/2023/08/31/cell-structure/index.html @@ -27,7 +27,7 @@ - + diff --git a/2023/10/03/busuanzi-bug/index.html b/2023/10/03/busuanzi-bug/index.html index bd549bd..4e5e53f 100644 --- a/2023/10/03/busuanzi-bug/index.html +++ b/2023/10/03/busuanzi-bug/index.html @@ -29,7 +29,7 @@ - + diff --git a/about/index.html b/about/index.html index 66feb24..db0b249 100644 --- a/about/index.html +++ b/about/index.html @@ -24,7 +24,7 @@ - + diff --git a/js/statistics.js b/js/statistics.js index 499c191..eaa0191 100644 --- a/js/statistics.js +++ b/js/statistics.js @@ -1,13 +1,14 @@ async function main() { let resp = await fetch("https://blog-api.cxzlw.top/count", { - method: "POST", // or 'PUT' + method: "POST", headers: { "Content-Type": "application/json", }, body: JSON.stringify( { "page_url": window.location.href - }), + } + ), }); let result = await resp.json(); @@ -39,4 +40,37 @@ async function main() { } } -main(); \ No newline at end of file +async function article_views(element) { + let url = element.children[0].children[0].href; + let post_metas = element.children[2]; + + let resp = await fetch("https://blog-api.cxzlw.top/count?" + new URLSearchParams({page_url: url, t: new Date()}), { + method: "GET", + cache: "no-cache" + }); + + let result = await resp.json(); + console.log(result); + + let count = result.page_pv; + + let node = document.createElement("div"); + post_metas.appendChild(node); + node.outerHTML = ` +
+ + ${count} +
`; +} + +async function index_article_views() { + let articles = document.getElementsByClassName("index-info"); + for (const element of articles) { + article_views(element) + } +} + +main(); +if (window.location.pathname === "/") { + index_article_views(); +} \ No newline at end of file diff --git a/sitemap.xml b/sitemap.xml index dc39ce5..41f86d7 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -11,7 +11,7 @@ - https://blog.cxzlw.top/2023/07/10/trace-of-line-02/ + https://blog.cxzlw.top/2023/10/03/busuanzi-bug/ 2023-10-04 @@ -20,7 +20,7 @@ - https://blog.cxzlw.top/2023/07/06/zerotier-planet-convert/ + https://blog.cxzlw.top/2023/08/31/cell-structure/ 2023-10-04 @@ -29,7 +29,7 @@ - https://blog.cxzlw.top/2023/07/05/zhihu-aac-old/ + https://blog.cxzlw.top/2023/08/04/permission-system-design-share/ 2023-10-04 @@ -38,7 +38,7 @@ - https://blog.cxzlw.top/about/index.html + https://blog.cxzlw.top/2023/08/04/test-latex/ 2023-10-04 @@ -47,7 +47,7 @@ - https://blog.cxzlw.top/2023/10/03/busuanzi-bug/ + https://blog.cxzlw.top/2023/07/05/trace-of-line-01/ 2023-10-04 @@ -56,7 +56,7 @@ - https://blog.cxzlw.top/2023/08/31/cell-structure/ + https://blog.cxzlw.top/2023/07/10/trace-of-line-02/ 2023-10-04 @@ -65,7 +65,7 @@ - https://blog.cxzlw.top/2023/08/04/permission-system-design-share/ + https://blog.cxzlw.top/2023/07/06/zerotier-planet-convert/ 2023-10-04 @@ -74,7 +74,7 @@ - https://blog.cxzlw.top/2023/08/04/test-latex/ + https://blog.cxzlw.top/2023/07/05/zhihu-aac-old/ 2023-10-04 @@ -83,7 +83,7 @@ - https://blog.cxzlw.top/2023/07/05/trace-of-line-01/ + https://blog.cxzlw.top/about/index.html 2023-10-04 diff --git a/sw.js b/sw.js index 2aa5ad7..cd8b6ef 100644 --- a/sw.js +++ b/sw.js @@ -19,7 +19,7 @@ registerRoute(/^https:\/\/blog\.cxzlw\.top\/.*/, networkFirst, "GET"); registerRoute(/^http:\/\/localhost:8000\/.*\.html/, networkFirst, "GET"); // registerRoute(/^http:\/\/localhost:8000\/.*/, staleWhileRevalidate, "GET"); -const urls = [{"revision":"6caa653795ec51a49ceba7c8b0da39fa","url":"2023/07/05/trace-of-line-01/index.html"},{"revision":"99e18a028c69d41b421a1c7701e52d3e","url":"2023/07/05/zhihu-aac-old/index.html"},{"revision":"1773b513cdbf58c122155d92b0eabe11","url":"2023/07/06/zerotier-planet-convert/index.html"},{"revision":"4b51f3efe49e89831e774a51477ba7df","url":"2023/07/10/trace-of-line-02/index.html"},{"revision":"bcf87bfcded62e61fbad7f3ae627832f","url":"2023/08/04/permission-system-design-share/index.html"},{"revision":"02a53414a41f15ecf9bd597b52e98579","url":"2023/08/04/test-latex/index.html"},{"revision":"4cc1adadf26a54aae99fdd07f5c4a0a9","url":"2023/08/31/cell-structure/index.html"},{"revision":"dc8716faec3015a5fd100ed28eb4940d","url":"2023/10/03/busuanzi-bug/index.html"},{"revision":"ab0f3524a6073a04d9e65be0594eb661","url":"404.html"},{"revision":"45e51f2fbbb952ab763bb9969567672b","url":"about/index.html"},{"revision":"1a068d35173b253f12932d4e6eb87e8b","url":"archives/2023/07/index.html"},{"revision":"342970ac8db03839ae6bc1d095176dc0","url":"archives/2023/08/index.html"},{"revision":"3c7bcc64dce96b5be4eed00e51e97c05","url":"archives/2023/10/index.html"},{"revision":"ca6a19dd85e7f5a1c62939d22854997d","url":"archives/2023/index.html"},{"revision":"ec22c0f8791ef0d5b992d4f52103f804","url":"archives/index.html"},{"revision":"242837d47be8b7c244eb3b8bfc38e027","url":"baidu_verify_codeva-0rhRRODu4H.html"},{"revision":"62b328640af6af42478c54f90e3b245b","url":"BingSiteAuth.xml"},{"revision":"5307118c0d4b369addc74b457e72d386","url":"categories/index.html"},{"revision":"5ce280d86637a41c57fdc51fd463237a","url":"css/gitalk.css"},{"revision":"be3af4b8abf2074e66acb737867c43dc","url":"css/highlight-dark.css"},{"revision":"fdd56de5edd1e833674574fdc74bbfe7","url":"css/highlight.css"},{"revision":"7d6d29df18411568c1ae622605bc1907","url":"css/main.css"},{"revision":"71cb12d00310a7852b853744c41d9a34","url":"favicon.ico"},{"revision":"ea11c930cb20962f72c29f0e2931bfbd","url":"img/animal.jpg"},{"revision":"2d9aa61e592b26e2745f3c161c48c397","url":"img/avatar.png"},{"revision":"beb05a6b5b201044b6d80cacdf29f905","url":"img/default.png"},{"revision":"5603316bb5bc54a9d5cab14fddd4c510","url":"img/fluid.png"},{"revision":"4d772ced566ade339ca6718c7ed38674","url":"img/image-1.png"},{"revision":"dcfafd0cc238b0a63a733edd1a70bcfe","url":"img/image-2.png"},{"revision":"5ba9885de31a8d1e8df04a1d915b1069","url":"img/image-3.png"},{"revision":"3d2983fa8549bb6a93b7b905a6baea9c","url":"img/image-4.png"},{"revision":"55692e23130e9504505085798384e43e","url":"img/image-5.png"},{"revision":"88c5e4fa4dec4b514a5d0d53b72d75c7","url":"img/image-6.png"},{"revision":"e52801ec8fe9abad24f24c8d96402fb3","url":"img/image-7.png"},{"revision":"3f940453e65f4635917f162b9a1d1432","url":"img/image-8.png"},{"revision":"47c43a3db8dca516e147f6f38324c1eb","url":"img/image-9.png"},{"revision":"18a13cfe951c406bbb4da3a7e7bc8ca2","url":"img/image.png"},{"revision":"a88a6883f6f27cd7b95a3ae753f91a40","url":"img/img-20231004-chrome-busuanzi.png"},{"revision":"f6f63a28b80c91ec49153f37df82f42d","url":"img/img-20231004-safari-busuanzi.png"},{"revision":"15657539044e11a19a1c6c7e3073d1b3","url":"img/loading.gif"},{"revision":"1b164cde9b70a49e2f3831d211be9f66","url":"img/plant.jpg"},{"revision":"b769e8dfde5660239317ed60758dba13","url":"img/police_beian.png"},{"revision":"74669a1c8e0c10b60ff13c2430adae44","url":"img/prokaryotic.jpg"},{"revision":"5c1f28954351fd0bfa70ef8305bd1979","url":"index.html"},{"revision":"7683fab2fc9d03a3a659aa956b3a54e8","url":"js/boot.js"},{"revision":"605f587be2ab3d36472bb03ac27ede65","url":"js/color-schema.js"},{"revision":"7fa076a71a5559d89af6b0c6dfd3a0d2","url":"js/events.js"},{"revision":"fab30a410e5f490fce3f977a6936a714","url":"js/img-lazyload.js"},{"revision":"fb4a815ccdb5d851d00561dbb62251c4","url":"js/leancloud.js"},{"revision":"9dc47a0b7b6bacfd16541c9b2b5b6bc5","url":"js/local-search.js"},{"revision":"6c10bee3f659ca91b534bf4a81d62f1e","url":"js/plugins.js"},{"revision":"bc2f15d100bdd8e7ecbaf2ca670a714f","url":"js/progressbar_done.js"},{"revision":"9a3939e6e13a11be286af20a9237bafe","url":"js/statistics.js"},{"revision":"f7ce9014de1cd7358eeb3aba81c8efe2","url":"js/utils.js"},{"revision":"78f11ab4248ecbdf3ab878b54bfbb67d","url":"links/index.html"},{"revision":"e7196722649f9445aa79c5b0253e182f","url":"local-search.xml"},{"revision":"a23d3fe8d9d1a556c04977dee4a3f65b","url":"sitemap.xml"},{"revision":"3ba32ddc9ab823f4968d230d1194d87f","url":"tags/busuanzi/index.html"},{"revision":"9233aaf3bf349f3c221f54cf55f687d3","url":"tags/cxzlw/index.html"},{"revision":"978a806d3d4aa7d3216a96a97ea80b20","url":"tags/Fluid/index.html"},{"revision":"6ab451e853e4e676ca0d096fefd18d20","url":"tags/Hexo/index.html"},{"revision":"a183e4c161bc80391cdece086d63c07a","url":"tags/index.html"},{"revision":"f19a9c82cc2df764e757cb5d02b68d0a","url":"tags/Python/index.html"},{"revision":"50bd913e70d61cd76d05280efa9b64bb","url":"tags/Zerotier/index.html"},{"revision":"a5c722dd197efe882c4f266ddcea89d0","url":"tags/不蒜子/index.html"},{"revision":"d207c5d9495ad5c72821b213658e2df5","url":"tags/反爬/index.html"},{"revision":"01e1c7e17be38b605d9ca00d3c98575b","url":"tags/小说/index.html"},{"revision":"69b4a1bb49fc531727d28339deb83aa1","url":"tags/权限系统/index.html"},{"revision":"fb49a71aa8b277c9d4b32e0e165f7d34","url":"tags/知乎/index.html"},{"revision":"db9f2b044ff42cff0a56561e406977c6","url":"tags/离谱网文/index.html"},{"revision":"dc86c06000c2c82743bb2eaccac8976e","url":"tags/自建-Planet/index.html"},{"revision":"72bbc63a465fd9131f2c49ca67895182","url":"tags/路过的某个学渣/index.html"},{"revision":"c98317b53515dd94d7fe36b96f020aff","url":"tags/飞石/index.html"},{"revision":"decd4b8f6af7e1c9d8ae97249ac786fa","url":"xml/local-search.xml"}].map(element => element["url"]); +const urls = [{"revision":"be4136499b98593b6f6df3132d3c4b31","url":"2023/07/05/trace-of-line-01/index.html"},{"revision":"abe43f518b6ae0a160516e32af095020","url":"2023/07/05/zhihu-aac-old/index.html"},{"revision":"d4d83edc0698f2656a256d731e369f64","url":"2023/07/06/zerotier-planet-convert/index.html"},{"revision":"4d45118f318189f908ba30fdea76ba39","url":"2023/07/10/trace-of-line-02/index.html"},{"revision":"3c5918bf4aa2489b0a3ef3e8d80529e6","url":"2023/08/04/permission-system-design-share/index.html"},{"revision":"a91857d373edc956a76a70513215585c","url":"2023/08/04/test-latex/index.html"},{"revision":"a40ad0eaf96bff2d373e314ee5b2102a","url":"2023/08/31/cell-structure/index.html"},{"revision":"c249fa950131ab3924bf1ca1b5a3bf9b","url":"2023/10/03/busuanzi-bug/index.html"},{"revision":"ab0f3524a6073a04d9e65be0594eb661","url":"404.html"},{"revision":"99ee0124a9a96bbd3c105ad41a20e5c7","url":"about/index.html"},{"revision":"1a068d35173b253f12932d4e6eb87e8b","url":"archives/2023/07/index.html"},{"revision":"342970ac8db03839ae6bc1d095176dc0","url":"archives/2023/08/index.html"},{"revision":"3c7bcc64dce96b5be4eed00e51e97c05","url":"archives/2023/10/index.html"},{"revision":"ca6a19dd85e7f5a1c62939d22854997d","url":"archives/2023/index.html"},{"revision":"ec22c0f8791ef0d5b992d4f52103f804","url":"archives/index.html"},{"revision":"242837d47be8b7c244eb3b8bfc38e027","url":"baidu_verify_codeva-0rhRRODu4H.html"},{"revision":"62b328640af6af42478c54f90e3b245b","url":"BingSiteAuth.xml"},{"revision":"5307118c0d4b369addc74b457e72d386","url":"categories/index.html"},{"revision":"5ce280d86637a41c57fdc51fd463237a","url":"css/gitalk.css"},{"revision":"be3af4b8abf2074e66acb737867c43dc","url":"css/highlight-dark.css"},{"revision":"fdd56de5edd1e833674574fdc74bbfe7","url":"css/highlight.css"},{"revision":"7d6d29df18411568c1ae622605bc1907","url":"css/main.css"},{"revision":"71cb12d00310a7852b853744c41d9a34","url":"favicon.ico"},{"revision":"ea11c930cb20962f72c29f0e2931bfbd","url":"img/animal.jpg"},{"revision":"2d9aa61e592b26e2745f3c161c48c397","url":"img/avatar.png"},{"revision":"beb05a6b5b201044b6d80cacdf29f905","url":"img/default.png"},{"revision":"5603316bb5bc54a9d5cab14fddd4c510","url":"img/fluid.png"},{"revision":"4d772ced566ade339ca6718c7ed38674","url":"img/image-1.png"},{"revision":"dcfafd0cc238b0a63a733edd1a70bcfe","url":"img/image-2.png"},{"revision":"5ba9885de31a8d1e8df04a1d915b1069","url":"img/image-3.png"},{"revision":"3d2983fa8549bb6a93b7b905a6baea9c","url":"img/image-4.png"},{"revision":"55692e23130e9504505085798384e43e","url":"img/image-5.png"},{"revision":"88c5e4fa4dec4b514a5d0d53b72d75c7","url":"img/image-6.png"},{"revision":"e52801ec8fe9abad24f24c8d96402fb3","url":"img/image-7.png"},{"revision":"3f940453e65f4635917f162b9a1d1432","url":"img/image-8.png"},{"revision":"47c43a3db8dca516e147f6f38324c1eb","url":"img/image-9.png"},{"revision":"18a13cfe951c406bbb4da3a7e7bc8ca2","url":"img/image.png"},{"revision":"a88a6883f6f27cd7b95a3ae753f91a40","url":"img/img-20231004-chrome-busuanzi.png"},{"revision":"f6f63a28b80c91ec49153f37df82f42d","url":"img/img-20231004-safari-busuanzi.png"},{"revision":"15657539044e11a19a1c6c7e3073d1b3","url":"img/loading.gif"},{"revision":"1b164cde9b70a49e2f3831d211be9f66","url":"img/plant.jpg"},{"revision":"b769e8dfde5660239317ed60758dba13","url":"img/police_beian.png"},{"revision":"74669a1c8e0c10b60ff13c2430adae44","url":"img/prokaryotic.jpg"},{"revision":"5c1f28954351fd0bfa70ef8305bd1979","url":"index.html"},{"revision":"7683fab2fc9d03a3a659aa956b3a54e8","url":"js/boot.js"},{"revision":"605f587be2ab3d36472bb03ac27ede65","url":"js/color-schema.js"},{"revision":"7fa076a71a5559d89af6b0c6dfd3a0d2","url":"js/events.js"},{"revision":"fab30a410e5f490fce3f977a6936a714","url":"js/img-lazyload.js"},{"revision":"fb4a815ccdb5d851d00561dbb62251c4","url":"js/leancloud.js"},{"revision":"9dc47a0b7b6bacfd16541c9b2b5b6bc5","url":"js/local-search.js"},{"revision":"6c10bee3f659ca91b534bf4a81d62f1e","url":"js/plugins.js"},{"revision":"bc2f15d100bdd8e7ecbaf2ca670a714f","url":"js/progressbar_done.js"},{"revision":"c9058e6f4adc7eb648e126ab84afc8d6","url":"js/statistics.js"},{"revision":"f7ce9014de1cd7358eeb3aba81c8efe2","url":"js/utils.js"},{"revision":"78f11ab4248ecbdf3ab878b54bfbb67d","url":"links/index.html"},{"revision":"e7196722649f9445aa79c5b0253e182f","url":"local-search.xml"},{"revision":"b6718b0568d7c81f3c40b07945cb439c","url":"sitemap.xml"},{"revision":"3ba32ddc9ab823f4968d230d1194d87f","url":"tags/busuanzi/index.html"},{"revision":"9233aaf3bf349f3c221f54cf55f687d3","url":"tags/cxzlw/index.html"},{"revision":"978a806d3d4aa7d3216a96a97ea80b20","url":"tags/Fluid/index.html"},{"revision":"6ab451e853e4e676ca0d096fefd18d20","url":"tags/Hexo/index.html"},{"revision":"a183e4c161bc80391cdece086d63c07a","url":"tags/index.html"},{"revision":"f19a9c82cc2df764e757cb5d02b68d0a","url":"tags/Python/index.html"},{"revision":"50bd913e70d61cd76d05280efa9b64bb","url":"tags/Zerotier/index.html"},{"revision":"a5c722dd197efe882c4f266ddcea89d0","url":"tags/不蒜子/index.html"},{"revision":"d207c5d9495ad5c72821b213658e2df5","url":"tags/反爬/index.html"},{"revision":"01e1c7e17be38b605d9ca00d3c98575b","url":"tags/小说/index.html"},{"revision":"69b4a1bb49fc531727d28339deb83aa1","url":"tags/权限系统/index.html"},{"revision":"fb49a71aa8b277c9d4b32e0e165f7d34","url":"tags/知乎/index.html"},{"revision":"db9f2b044ff42cff0a56561e406977c6","url":"tags/离谱网文/index.html"},{"revision":"dc86c06000c2c82743bb2eaccac8976e","url":"tags/自建-Planet/index.html"},{"revision":"72bbc63a465fd9131f2c49ca67895182","url":"tags/路过的某个学渣/index.html"},{"revision":"c98317b53515dd94d7fe36b96f020aff","url":"tags/飞石/index.html"},{"revision":"decd4b8f6af7e1c9d8ae97249ac786fa","url":"xml/local-search.xml"}].map(element => element["url"]); const index_urls = urls.filter(url => url.endsWith("index.html")).map(url => url.substring(0, url.length - 10)); warmStrategyCache({urls:urls, strategy:staleWhileRevalidate});