jekyll-theme-chirpy 6.2.0 → 6.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 17ed8fea7f8213eacb3429005db3cdcf2de2b282c0885c9b322473c52fd72f62
4
- data.tar.gz: aea2333b4c116ec8b529a3f2c0b835b79d447a3fcc32ce268e93ab3912bc299d
3
+ metadata.gz: 4a8806af7099ca00a5ba6849a1d53797b4bef114de18a1b720b24febed2b21f0
4
+ data.tar.gz: 82253cb28ce717645a3c48523baa119fdf4298baba3a8d52ce7344b9beb5108b
5
5
  SHA512:
6
- metadata.gz: 7f7fda4777a5225e0801dc9c6cee02a09e193f4cf255e4d553f619e8cd0e44616d45c0a9a2475e2f0261cb1a92c00b9f06c64f874dd54df03b74eb535a61a409
7
- data.tar.gz: 9f0af24d04554f821dd6b70575a410d1c4ba4bf516579cb714b6167ae7a5ad31c4412a61813e6033b7fde602ff47a631e80768f01fd832467981d81038a3c9f1
6
+ metadata.gz: 64d50c3edfdd08fae8cc43e9dad9ef7a1cc61ccbc51e5de9d356dbf13dc7c0ce90c20ec41c4690867e04f14088a77f72ff77b9f1db411a8fd0c0168eb981778d
7
+ data.tar.gz: abbb8b02ca8307dfb148d9ada3a1d9c86658bef21b35b4a16956017511ae0715f51ddda870d5097d08ef349f912eeb1720e1520a08991c3b0e44c89aba006f5a
@@ -59,48 +59,46 @@
59
59
  {% endif %}
60
60
  {% endunless %}
61
61
 
62
- <address class="d-flex mb-0">
63
- {% for entry in site.data.contact %}
64
- {% case entry.type %}
65
- {% when 'github', 'twitter' %}
66
- {%- capture url -%}
62
+ {% for entry in site.data.contact %}
63
+ {% case entry.type %}
64
+ {% when 'github', 'twitter' %}
65
+ {%- capture url -%}
67
66
  https://{{ entry.type }}.com/{{ site[entry.type].username }}
68
67
  {%- endcapture -%}
69
- {% when 'email' %}
70
- {% assign email = site.social.email | split: '@' %}
71
- {%- capture url -%}
68
+ {% when 'email' %}
69
+ {% assign email = site.social.email | split: '@' %}
70
+ {%- capture url -%}
72
71
  javascript:location.href = 'mailto:' + ['{{ email[0] }}','{{ email[1] }}'].join('@')
73
72
  {%- endcapture -%}
74
- {% when 'rss' %}
75
- {% assign url = '/feed.xml' | relative_url %}
76
- {% else %}
77
- {% assign url = entry.url %}
78
- {% endcase %}
73
+ {% when 'rss' %}
74
+ {% assign url = '/feed.xml' | relative_url %}
75
+ {% else %}
76
+ {% assign url = entry.url %}
77
+ {% endcase %}
79
78
 
80
- {% if url %}
81
- <a
82
- href="{{ url }}"
83
- aria-label="{{ entry.type }}"
84
- {% assign link_types = '' %}
79
+ {% if url %}
80
+ <a
81
+ href="{{ url }}"
82
+ aria-label="{{ entry.type }}"
83
+ {% assign link_types = '' %}
85
84
 
86
- {% unless entry.noblank %}
87
- target="_blank"
88
- {% assign link_types = 'noopener noreferrer' %}
89
- {% endunless %}
85
+ {% unless entry.noblank %}
86
+ target="_blank"
87
+ {% assign link_types = 'noopener noreferrer' %}
88
+ {% endunless %}
90
89
 
91
- {% if entry.type == 'mastodon' %}
92
- {% assign link_types = link_types | append: ' me' | strip %}
93
- {% endif %}
90
+ {% if entry.type == 'mastodon' %}
91
+ {% assign link_types = link_types | append: ' me' | strip %}
92
+ {% endif %}
94
93
 
95
- {% unless link_types == empty %}
96
- rel="{{ link_types }}"
97
- {% endunless %}
98
- >
99
- <i class="{{ entry.icon }}"></i>
100
- </a>
101
- {% endif %}
102
- {% endfor %}
103
- </address>
94
+ {% unless link_types == empty %}
95
+ rel="{{ link_types }}"
96
+ {% endunless %}
97
+ >
98
+ <i class="{{ entry.icon }}"></i>
99
+ </a>
100
+ {% endif %}
101
+ {% endfor %}
104
102
  </div>
105
103
  <!-- .sidebar-bottom -->
106
104
  </aside>
@@ -830,8 +830,8 @@ $btn-mb: 0.5rem;
830
830
  }
831
831
 
832
832
  .sidebar-bottom {
833
- @include pl-pr(2rem);
834
-
833
+ padding-left: 2rem;
834
+ padding-right: 1rem;
835
835
  margin-bottom: 1.5rem;
836
836
 
837
837
  %button {
@@ -1,49 +1,48 @@
1
1
  ---
2
2
  layout: compress
3
-
4
3
  # The list to be cached by PWA
5
4
  ---
6
5
 
7
6
  const resource = [
8
- /* --- CSS --- */
9
- '{{ "/assets/css/style.css" | relative_url }}',
10
-
11
- /* --- PWA --- */
12
- '{{ "/app.js" | relative_url }}',
13
- '{{ "/sw.js" | relative_url }}',
14
-
15
- /* --- HTML --- */
16
- '{{ "/index.html" | relative_url }}',
17
- '{{ "/404.html" | relative_url }}',
18
-
19
- {% for tab in site.tabs %}
20
- '{{ tab.url | relative_url }}',
21
- {% endfor %}
22
-
23
- /* --- Favicons & compressed JS --- */
24
- {% assign cache_list = site.static_files | where: 'swcache', true %}
25
- {% for file in cache_list %}
26
- '{{ file.path | relative_url }}'{%- unless forloop.last -%},{%- endunless -%}
27
- {% endfor %}
7
+ /* --- CSS --- */
8
+ '{{ "/assets/css/:THEME.css" | replace: ':THEME', site.theme | relative_url }}',
9
+
10
+ /* --- PWA --- */
11
+ '{{ "/app.js" | relative_url }}',
12
+ '{{ "/sw.js" | relative_url }}',
13
+
14
+ /* --- HTML --- */
15
+ '{{ "/index.html" | relative_url }}',
16
+ '{{ "/404.html" | relative_url }}',
17
+
18
+ {% for tab in site.tabs %}
19
+ '{{ tab.url | relative_url }}',
20
+ {% endfor %}
21
+
22
+ /* --- Favicons & compressed JS --- */
23
+ {% assign cache_list = site.static_files | where: 'swcache', true %}
24
+ {% for file in cache_list %}
25
+ '{{ file.path | relative_url }}'{%- unless forloop.last -%},{%- endunless -%}
26
+ {% endfor %}
28
27
  ];
29
28
 
30
29
  /* The request url with below domain will be cached */
31
30
  const allowedDomains = [
32
- {% if site.google_analytics.id != empty and site.google_analytics.id %}
33
- 'www.googletagmanager.com',
34
- 'www.google-analytics.com',
35
- {% endif %}
31
+ {% if site.google_analytics.id != empty and site.google_analytics.id %}
32
+ 'www.googletagmanager.com',
33
+ 'www.google-analytics.com',
34
+ {% endif %}
36
35
 
37
- '{{ site.url | split: "//" | last }}',
36
+ '{{ site.url | split: "//" | last }}',
38
37
 
39
- {% if site.img_cdn contains '//' and site.img_cdn %}
40
- '{{ site.img_cdn | split: '//' | last | split: '/' | first }}',
41
- {% endif %}
38
+ {% if site.img_cdn contains '//' and site.img_cdn %}
39
+ '{{ site.img_cdn | split: '//' | last | split: '/' | first }}',
40
+ {% endif %}
42
41
 
43
- 'fonts.gstatic.com',
44
- 'fonts.googleapis.com',
45
- 'cdn.jsdelivr.net',
46
- 'polyfill.io'
42
+ 'fonts.gstatic.com',
43
+ 'fonts.googleapis.com',
44
+ 'cdn.jsdelivr.net',
45
+ 'polyfill.io'
47
46
  ];
48
47
 
49
48
  /* Requests that include the following path will be banned */
@@ -1,4 +1,4 @@
1
1
  /*!
2
- * Chirpy v6.2.0 | © 2019 Cotes Chung | MIT Licensed | https://github.com/cotes2020/jekyll-theme-chirpy/
2
+ * Chirpy v6.2.2 | © 2019 Cotes Chung | MIT Licensed | https://github.com/cotes2020/jekyll-theme-chirpy/
3
3
  */
4
4
  !function(){"use strict";function e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function t(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,i(o.key),o)}}function r(e,r,o){return r&&t(e.prototype,r),o&&t(e,o),Object.defineProperty(e,"prototype",{writable:!1}),e}function o(e,t,r){return(t=i(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function i(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var l=$(".mode-toggle");var s=$("body"),c="sidebar-display",u=function(){function t(){e(this,t)}return r(t,null,[{key:"toggle",value:function(){!1===t.isExpanded?s.attr(c,""):s.removeAttr(c),t.isExpanded=!t.isExpanded}}]),t}();o(u,"isExpanded",!1);var f=$("#sidebar-trigger"),d=$("#search-trigger"),p=$("#search-cancel"),b=$("#main-wrapper>.container>.row"),v=$("#topbar-title"),m=$("search"),g=$("#search-result-wrapper"),y=$("#search-results"),h=$("#search-input"),C=$("#search-hints"),w=$("html,body"),k="loaded",A="unloaded",S="input-focus",T="d-flex",j=function(){function t(){e(this,t)}return r(t,null,[{key:"on",value:function(){t.offset=window.scrollY,w.scrollTop(0)}},{key:"off",value:function(){w.scrollTop(t.offset)}}]),t}();o(j,"offset",0),o(j,"resultVisible",!1);var E=function(){function t(){e(this,t)}return r(t,null,[{key:"on",value:function(){f.addClass(A),v.addClass(A),d.addClass(A),m.addClass(T),p.addClass(k)}},{key:"off",value:function(){p.removeClass(k),m.removeClass(T),f.removeClass(A),v.removeClass(A),d.removeClass(A)}}]),t}(),O=function(){function t(){e(this,t)}return r(t,null,[{key:"on",value:function(){j.resultVisible||(j.on(),g.removeClass(A),b.addClass(A),j.resultVisible=!0)}},{key:"off",value:function(){j.resultVisible&&(y.empty(),C.hasClass(A)&&C.removeClass(A),g.addClass(A),b.removeClass(A),j.off(),h.val(""),j.resultVisible=!1)}}]),t}();function x(){return p.hasClass(k)}var P=$(".collapse");var V,I;$(".code-header>button").children().attr("class"),V=$(window),I=$("#back-to-top"),V.on("scroll",(function(){V.scrollTop()>50?I.fadeIn():I.fadeOut()})),I.on("click",(function(){V.scrollTop(0)})),n(document.querySelectorAll('[data-bs-toggle="tooltip"]')).map((function(e){return new bootstrap.Tooltip(e)})),0!==l.length&&l.off().on("click",(function(e){var t=$(e.target),r=t.prop("tagName")==="button".toUpperCase()?t:t.parent();modeToggle.flipMode(),r.trigger("blur")})),$("#sidebar-trigger").on("click",u.toggle),$("#mask").on("click",u.toggle),d.on("click",(function(){E.on(),O.on(),h.trigger("focus")})),p.on("click",(function(){E.off(),O.off()})),h.on("focus",(function(){m.addClass(S)})),h.on("focusout",(function(){m.removeClass(S)})),h.on("input",(function(){""===h.val()?x()?C.removeClass(A):O.off():(O.on(),x()&&C.addClass(A))})),P.on("hide.bs.collapse",(function(){var e="h_"+$(this).attr("id").substring(2);e&&($("#".concat(e," .far.fa-folder-open")).attr("class","far fa-folder fa-fw"),$("#".concat(e," i.fas")).addClass("rotate"),$("#".concat(e)).removeClass("hide-border-bottom"))})),P.on("show.bs.collapse",(function(){var e="h_"+$(this).attr("id").substring(2);e&&($("#".concat(e," .far.fa-folder")).attr("class","far fa-folder-open fa-fw"),$("#".concat(e," i.fas")).removeClass("rotate"),$("#".concat(e)).addClass("hide-border-bottom"))}))}();
@@ -1,4 +1,4 @@
1
1
  /*!
2
- * Chirpy v6.2.0 | © 2019 Cotes Chung | MIT Licensed | https://github.com/cotes2020/jekyll-theme-chirpy/
2
+ * Chirpy v6.2.2 | © 2019 Cotes Chung | MIT Licensed | https://github.com/cotes2020/jekyll-theme-chirpy/
3
3
  */
4
4
  !function(){"use strict";function e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function t(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,i(n.key),n)}}function r(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function n(e,t,r){return(t=i(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function i(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var l=$(".mode-toggle");var s=$("body"),u="sidebar-display",c=function(){function t(){e(this,t)}return r(t,null,[{key:"toggle",value:function(){!1===t.isExpanded?s.attr(u,""):s.removeAttr(u),t.isExpanded=!t.isExpanded}}]),t}();n(c,"isExpanded",!1);var f=$("#sidebar-trigger"),d=$("#search-trigger"),p=$("#search-cancel"),b=$("#main-wrapper>.container>.row"),m=$("#topbar-title"),v=$("search"),y=$("#search-result-wrapper"),g=$("#search-results"),h=$("#search-input"),C=$("#search-hints"),w=$("html,body"),k="loaded",A="unloaded",S="input-focus",T="d-flex",j=function(){function t(){e(this,t)}return r(t,null,[{key:"on",value:function(){t.offset=window.scrollY,w.scrollTop(0)}},{key:"off",value:function(){w.scrollTop(t.offset)}}]),t}();n(j,"offset",0),n(j,"resultVisible",!1);var E,O,x=function(){function t(){e(this,t)}return r(t,null,[{key:"on",value:function(){f.addClass(A),m.addClass(A),d.addClass(A),v.addClass(T),p.addClass(k)}},{key:"off",value:function(){p.removeClass(k),v.removeClass(T),f.removeClass(A),m.removeClass(A),d.removeClass(A)}}]),t}(),P=function(){function t(){e(this,t)}return r(t,null,[{key:"on",value:function(){j.resultVisible||(j.on(),y.removeClass(A),b.addClass(A),j.resultVisible=!0)}},{key:"off",value:function(){j.resultVisible&&(g.empty(),C.hasClass(A)&&C.removeClass(A),y.addClass(A),b.removeClass(A),j.off(),h.val(""),j.resultVisible=!1)}}]),t}();function V(){return p.hasClass(k)}E=$(window),O=$("#back-to-top"),E.on("scroll",(function(){E.scrollTop()>50?O.fadeIn():O.fadeOut()})),O.on("click",(function(){E.scrollTop(0)})),o(document.querySelectorAll('[data-bs-toggle="tooltip"]')).map((function(e){return new bootstrap.Tooltip(e)})),0!==l.length&&l.off().on("click",(function(e){var t=$(e.target),r=t.prop("tagName")==="button".toUpperCase()?t:t.parent();modeToggle.flipMode(),r.trigger("blur")})),$("#sidebar-trigger").on("click",c.toggle),$("#mask").on("click",c.toggle),d.on("click",(function(){x.on(),P.on(),h.trigger("focus")})),p.on("click",(function(){x.off(),P.off()})),h.on("focus",(function(){v.addClass(S)})),h.on("focusout",(function(){v.removeClass(S)})),h.on("input",(function(){""===h.val()?V()?C.removeClass(A):P.off():(P.on(),V()&&C.addClass(A))}))}();
@@ -1,4 +1,4 @@
1
1
  /*!
2
- * Chirpy v6.2.0 | © 2019 Cotes Chung | MIT Licensed | https://github.com/cotes2020/jekyll-theme-chirpy/
2
+ * Chirpy v6.2.2 | © 2019 Cotes Chung | MIT Licensed | https://github.com/cotes2020/jekyll-theme-chirpy/
3
3
  */
4
4
  !function(){"use strict";function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,i(n.key),n)}}function r(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function n(t,e,r){return(e=i(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return a(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function i(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}var l=$(".mode-toggle");var s=$("body"),u="sidebar-display",c=function(){function e(){t(this,e)}return r(e,null,[{key:"toggle",value:function(){!1===e.isExpanded?s.attr(u,""):s.removeAttr(u),e.isExpanded=!e.isExpanded}}]),e}();n(c,"isExpanded",!1);var f=$("#sidebar-trigger"),d=$("#search-trigger"),m=$("#search-cancel"),p=$("#main-wrapper>.container>.row"),g=$("#topbar-title"),v=$("search"),y=$("#search-result-wrapper"),b=$("#search-results"),h=$("#search-input"),C=$("#search-hints"),k=$("html,body"),w="loaded",T="unloaded",j="input-focus",A="d-flex",S=function(){function e(){t(this,e)}return r(e,null,[{key:"on",value:function(){e.offset=window.scrollY,k.scrollTop(0)}},{key:"off",value:function(){k.scrollTop(e.offset)}}]),e}();n(S,"offset",0),n(S,"resultVisible",!1);var x=function(){function e(){t(this,e)}return r(e,null,[{key:"on",value:function(){f.addClass(T),g.addClass(T),d.addClass(T),v.addClass(A),m.addClass(w)}},{key:"off",value:function(){m.removeClass(w),v.removeClass(A),f.removeClass(T),g.removeClass(T),d.removeClass(T)}}]),e}(),E=function(){function e(){t(this,e)}return r(e,null,[{key:"on",value:function(){S.resultVisible||(S.on(),y.removeClass(T),p.addClass(T),S.resultVisible=!0)}},{key:"off",value:function(){S.resultVisible&&(b.empty(),C.hasClass(T)&&C.removeClass(T),y.addClass(T),p.removeClass(T),S.off(),h.val(""),S.resultVisible=!1)}}]),e}();function F(){return m.hasClass(w)}$(".collapse");function O(t){t.parent().removeClass("shimmer")}$(".code-header>button").children().attr("class");var D,P,V,I=function(){function e(){t(this,e)}return r(e,null,[{key:"attrTimestamp",get:function(){return"data-ts"}},{key:"attrDateFormat",get:function(){return"data-df"}},{key:"locale",get:function(){return $("html").attr("lang").substring(0,2)}},{key:"getTimestamp",value:function(t){return Number(t.attr(e.attrTimestamp))}},{key:"getDateFormat",value:function(t){return t.attr(e.attrDateFormat)}}]),e}();D=$(window),P=$("#back-to-top"),D.on("scroll",(function(){D.scrollTop()>50?P.fadeIn():P.fadeOut()})),P.on("click",(function(){D.scrollTop(0)})),o(document.querySelectorAll('[data-bs-toggle="tooltip"]')).map((function(t){return new bootstrap.Tooltip(t)})),0!==l.length&&l.off().on("click",(function(t){var e=$(t.target),r=e.prop("tagName")==="button".toUpperCase()?e:e.parent();modeToggle.flipMode(),r.trigger("blur")})),$("#sidebar-trigger").on("click",c.toggle),$("#mask").on("click",c.toggle),d.on("click",(function(){x.on(),E.on(),h.trigger("focus")})),m.on("click",(function(){x.off(),E.off()})),h.on("focus",(function(){v.addClass(j)})),h.on("focusout",(function(){v.removeClass(j)})),h.on("input",(function(){""===h.val()?F()?C.removeClass(T):E.off():(E.on(),F()&&C.addClass(T))})),dayjs.locale(I.locale),dayjs.extend(window.dayjs_plugin_localizedFormat),$("[".concat(I.attrTimestamp,"]")).each((function(){var t=dayjs.unix(I.getTimestamp($(this))),e=t.format(I.getDateFormat($(this)));$(this).text(e),$(this).removeAttr(I.attrTimestamp),$(this).removeAttr(I.attrDateFormat);var r=$(this).attr("data-bs-toggle");if(void 0!==r&&"tooltip"===r){var n=t.format("llll");$(this).attr("data-bs-title",n),new bootstrap.Tooltip($(this))}})),(V=$("main img[data-src]")).length<=0||(document.addEventListener("lazyloaded",(function(t){O($(t.target))})),V.each((function(){$(this).hasClass("ls-is-cached")&&O($(this))})))}();
@@ -1,4 +1,4 @@
1
1
  /*!
2
- * Chirpy v6.2.0 | © 2019 Cotes Chung | MIT Licensed | https://github.com/cotes2020/jekyll-theme-chirpy/
2
+ * Chirpy v6.2.2 | © 2019 Cotes Chung | MIT Licensed | https://github.com/cotes2020/jekyll-theme-chirpy/
3
3
  */
4
4
  !function(){"use strict";function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,i(n.key),n)}}function r(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function n(t,e,r){return(e=i(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return a(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function i(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}var l=$(".mode-toggle");var s=$("body"),u="sidebar-display",c=function(){function e(){t(this,e)}return r(e,null,[{key:"toggle",value:function(){!1===e.isExpanded?s.attr(u,""):s.removeAttr(u),e.isExpanded=!e.isExpanded}}]),e}();n(c,"isExpanded",!1);var f=$("#sidebar-trigger"),d=$("#search-trigger"),m=$("#search-cancel"),p=$("#main-wrapper>.container>.row"),v=$("#topbar-title"),g=$("search"),y=$("#search-result-wrapper"),b=$("#search-results"),h=$("#search-input"),C=$("#search-hints"),k=$("html,body"),w="loaded",T="unloaded",j="input-focus",A="d-flex",S=function(){function e(){t(this,e)}return r(e,null,[{key:"on",value:function(){e.offset=window.scrollY,k.scrollTop(0)}},{key:"off",value:function(){k.scrollTop(e.offset)}}]),e}();n(S,"offset",0),n(S,"resultVisible",!1);var x=function(){function e(){t(this,e)}return r(e,null,[{key:"on",value:function(){f.addClass(T),v.addClass(T),d.addClass(T),g.addClass(A),m.addClass(w)}},{key:"off",value:function(){m.removeClass(w),g.removeClass(A),f.removeClass(T),v.removeClass(T),d.removeClass(T)}}]),e}(),E=function(){function e(){t(this,e)}return r(e,null,[{key:"on",value:function(){S.resultVisible||(S.on(),y.removeClass(T),p.addClass(T),S.resultVisible=!0)}},{key:"off",value:function(){S.resultVisible&&(b.empty(),C.hasClass(T)&&C.removeClass(T),y.addClass(T),p.removeClass(T),S.off(),h.val(""),S.resultVisible=!1)}}]),e}();function F(){return m.hasClass(w)}$(".collapse");$(".code-header>button").children().attr("class");var O,D,P=function(){function e(){t(this,e)}return r(e,null,[{key:"attrTimestamp",get:function(){return"data-ts"}},{key:"attrDateFormat",get:function(){return"data-df"}},{key:"locale",get:function(){return $("html").attr("lang").substring(0,2)}},{key:"getTimestamp",value:function(t){return Number(t.attr(e.attrTimestamp))}},{key:"getDateFormat",value:function(t){return t.attr(e.attrDateFormat)}}]),e}();O=$(window),D=$("#back-to-top"),O.on("scroll",(function(){O.scrollTop()>50?D.fadeIn():D.fadeOut()})),D.on("click",(function(){O.scrollTop(0)})),o(document.querySelectorAll('[data-bs-toggle="tooltip"]')).map((function(t){return new bootstrap.Tooltip(t)})),0!==l.length&&l.off().on("click",(function(t){var e=$(t.target),r=e.prop("tagName")==="button".toUpperCase()?e:e.parent();modeToggle.flipMode(),r.trigger("blur")})),$("#sidebar-trigger").on("click",c.toggle),$("#mask").on("click",c.toggle),d.on("click",(function(){x.on(),E.on(),h.trigger("focus")})),m.on("click",(function(){x.off(),E.off()})),h.on("focus",(function(){g.addClass(j)})),h.on("focusout",(function(){g.removeClass(j)})),h.on("input",(function(){""===h.val()?F()?C.removeClass(T):E.off():(E.on(),F()&&C.addClass(T))})),dayjs.locale(P.locale),dayjs.extend(window.dayjs_plugin_localizedFormat),$("[".concat(P.attrTimestamp,"]")).each((function(){var t=dayjs.unix(P.getTimestamp($(this))),e=t.format(P.getDateFormat($(this)));$(this).text(e),$(this).removeAttr(P.attrTimestamp),$(this).removeAttr(P.attrDateFormat);var r=$(this).attr("data-bs-toggle");if(void 0!==r&&"tooltip"===r){var n=t.format("llll");$(this).attr("data-bs-title",n),new bootstrap.Tooltip($(this))}}))}();
@@ -1,4 +1,4 @@
1
1
  /*!
2
- * Chirpy v6.2.0 | © 2019 Cotes Chung | MIT Licensed | https://github.com/cotes2020/jekyll-theme-chirpy/
2
+ * Chirpy v6.2.2 | © 2019 Cotes Chung | MIT Licensed | https://github.com/cotes2020/jekyll-theme-chirpy/
3
3
  */
4
4
  !function(){"use strict";function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,i(o.key),o)}}function n(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t}function o(t,e,n){return(e=i(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function r(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return a(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function i(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e||"default");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}var l=$(".mode-toggle");var u=$("body"),s="sidebar-display",c=function(){function e(){t(this,e)}return n(e,null,[{key:"toggle",value:function(){!1===e.isExpanded?u.attr(s,""):u.removeAttr(s),e.isExpanded=!e.isExpanded}}]),e}();o(c,"isExpanded",!1);var f=$("#sidebar-trigger"),d=$("#search-trigger"),p=$("#search-cancel"),m=$("#main-wrapper>.container>.row"),v=$("#topbar-title"),g=$("search"),b=$("#search-result-wrapper"),h=$("#search-results"),y=$("#search-input"),C=$("#search-hints"),w=$("html,body"),k="loaded",S="unloaded",A="input-focus",T="d-flex",E=function(){function e(){t(this,e)}return n(e,null,[{key:"on",value:function(){e.offset=window.scrollY,w.scrollTop(0)}},{key:"off",value:function(){w.scrollTop(e.offset)}}]),e}();o(E,"offset",0),o(E,"resultVisible",!1);var j=function(){function e(){t(this,e)}return n(e,null,[{key:"on",value:function(){f.addClass(S),v.addClass(S),d.addClass(S),g.addClass(T),p.addClass(k)}},{key:"off",value:function(){p.removeClass(k),g.removeClass(T),f.removeClass(S),v.removeClass(S),d.removeClass(S)}}]),e}(),x=function(){function e(){t(this,e)}return n(e,null,[{key:"on",value:function(){E.resultVisible||(E.on(),b.removeClass(S),m.addClass(S),E.resultVisible=!0)}},{key:"off",value:function(){E.resultVisible&&(h.empty(),C.hasClass(S)&&C.removeClass(S),b.addClass(S),m.removeClass(S),E.off(),y.val(""),E.resultVisible=!1)}}]),e}();function O(){return p.hasClass(k)}$(".collapse");var P=".code-header>button",V="fas fa-check",I="timeout",N="data-title-succeed",q="data-bs-original-title",z=2e3;function D(t){if($(t)[0].hasAttribute(I)){var e=$(t).attr(I);if(Number(e)>Date.now())return!0}return!1}function M(t){$(t).attr(I,Date.now()+z)}function U(t){$(t).removeAttr(I)}var B,J,L,Y=$(P).children().attr("class");function F(t){t.parent().removeClass("shimmer")}B=$(window),J=$("#back-to-top"),B.on("scroll",(function(){B.scrollTop()>50?J.fadeIn():J.fadeOut()})),J.on("click",(function(){B.scrollTop(0)})),r(document.querySelectorAll('[data-bs-toggle="tooltip"]')).map((function(t){return new bootstrap.Tooltip(t)})),0!==l.length&&l.off().on("click",(function(t){var e=$(t.target),n=e.prop("tagName")==="button".toUpperCase()?e:e.parent();modeToggle.flipMode(),n.trigger("blur")})),$("#sidebar-trigger").on("click",c.toggle),$("#mask").on("click",c.toggle),d.on("click",(function(){j.on(),x.on(),y.trigger("focus")})),p.on("click",(function(){j.off(),x.off()})),y.on("focus",(function(){g.addClass(A)})),y.on("focusout",(function(){g.removeClass(A)})),y.on("input",(function(){""===y.val()?O()?C.removeClass(S):x.off():(x.on(),O()&&C.addClass(S))})),(L=$("main img[data-src]")).length<=0||(document.addEventListener("lazyloaded",(function(t){F($(t.target))})),L.each((function(){$(this).hasClass("ls-is-cached")&&F($(this))}))),$(".popup")<=0||$(".popup").magnificPopup({type:"image",closeOnContentClick:!0,showCloseBtn:!1,zoom:{enabled:!0,duration:300,easing:"ease-in-out"}}),function(){if($(P).length){var t=new ClipboardJS(P,{target:function(t){return t.parentNode.nextElementSibling.querySelector("code .rouge-code")}});r(document.querySelectorAll(P)).map((function(t){return new bootstrap.Tooltip(t,{placement:"left"})})),t.on("success",(function(t){t.clearSelection();var e=t.trigger;D(e)||(!function(t){$(t).children().attr("class",V)}(e),function(t){var e=$(t).attr(N);$(t).attr(q,e).tooltip("show")}(e),M(e),setTimeout((function(){!function(t){$(t).tooltip("hide").removeAttr(q)}(e),function(t){$(t).children().attr("class",Y)}(e),U(e)}),z))}))}var e=$("#copy-link");e.on("click",(function(t){var e=$(t.target);D(e)||navigator.clipboard.writeText(window.location.href).then((function(){var t=e.attr(q),n=e.attr(N);e.attr(q,n).tooltip("show"),M(e),setTimeout((function(){e.attr(q,t),U(e)}),z)}))})),e.on("mouseleave",(function(t){$(t.target).tooltip("hide"),console.log("mouse leave...")}))}()}();
@@ -1,4 +1,4 @@
1
1
  /*!
2
- * Chirpy v6.2.0 | © 2019 Cotes Chung | MIT Licensed | https://github.com/cotes2020/jekyll-theme-chirpy/
2
+ * Chirpy v6.2.2 | © 2019 Cotes Chung | MIT Licensed | https://github.com/cotes2020/jekyll-theme-chirpy/
3
3
  */
4
4
  !function(){"use strict";function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,i(o.key),o)}}function n(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t}function o(t,e,n){return(e=i(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function r(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return a(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function i(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e||"default");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}var l=$(".mode-toggle");var s=$("body"),c="sidebar-display",u=function(){function e(){t(this,e)}return n(e,null,[{key:"toggle",value:function(){!1===e.isExpanded?s.attr(c,""):s.removeAttr(c),e.isExpanded=!e.isExpanded}}]),e}();o(u,"isExpanded",!1);var f=$("#sidebar-trigger"),d=$("#search-trigger"),m=$("#search-cancel"),p=$("#main-wrapper>.container>.row"),g=$("#topbar-title"),v=$("search"),h=$("#search-result-wrapper"),b=$("#search-results"),y=$("#search-input"),w=$("#search-hints"),C=$("html,body"),k="loaded",S="unloaded",T="input-focus",A="d-flex",j=function(){function e(){t(this,e)}return n(e,null,[{key:"on",value:function(){e.offset=window.scrollY,C.scrollTop(0)}},{key:"off",value:function(){C.scrollTop(e.offset)}}]),e}();o(j,"offset",0),o(j,"resultVisible",!1);var x=function(){function e(){t(this,e)}return n(e,null,[{key:"on",value:function(){f.addClass(S),g.addClass(S),d.addClass(S),v.addClass(A),m.addClass(k)}},{key:"off",value:function(){m.removeClass(k),v.removeClass(A),f.removeClass(S),g.removeClass(S),d.removeClass(S)}}]),e}(),E=function(){function e(){t(this,e)}return n(e,null,[{key:"on",value:function(){j.resultVisible||(j.on(),h.removeClass(S),p.addClass(S),j.resultVisible=!0)}},{key:"off",value:function(){j.resultVisible&&(b.empty(),w.hasClass(S)&&w.removeClass(S),h.addClass(S),p.removeClass(S),j.off(),y.val(""),j.resultVisible=!1)}}]),e}();function D(){return m.hasClass(k)}$(".collapse");var O=".code-header>button",F="fas fa-check",P="timeout",N="data-title-succeed",V="data-bs-original-title",q=2e3;function I(t){if($(t)[0].hasAttribute(P)){var e=$(t).attr(P);if(Number(e)>Date.now())return!0}return!1}function z(t){$(t).attr(P,Date.now()+q)}function L(t){$(t).removeAttr(P)}var M=$(O).children().attr("class");function U(t){t.parent().removeClass("shimmer")}var _,B,J,Y=function(){function e(){t(this,e)}return n(e,null,[{key:"attrTimestamp",get:function(){return"data-ts"}},{key:"attrDateFormat",get:function(){return"data-df"}},{key:"locale",get:function(){return $("html").attr("lang").substring(0,2)}},{key:"getTimestamp",value:function(t){return Number(t.attr(e.attrTimestamp))}},{key:"getDateFormat",value:function(t){return t.attr(e.attrDateFormat)}}]),e}();_=$(window),B=$("#back-to-top"),_.on("scroll",(function(){_.scrollTop()>50?B.fadeIn():B.fadeOut()})),B.on("click",(function(){_.scrollTop(0)})),r(document.querySelectorAll('[data-bs-toggle="tooltip"]')).map((function(t){return new bootstrap.Tooltip(t)})),0!==l.length&&l.off().on("click",(function(t){var e=$(t.target),n=e.prop("tagName")==="button".toUpperCase()?e:e.parent();modeToggle.flipMode(),n.trigger("blur")})),$("#sidebar-trigger").on("click",u.toggle),$("#mask").on("click",u.toggle),d.on("click",(function(){x.on(),E.on(),y.trigger("focus")})),m.on("click",(function(){x.off(),E.off()})),y.on("focus",(function(){v.addClass(T)})),y.on("focusout",(function(){v.removeClass(T)})),y.on("input",(function(){""===y.val()?D()?w.removeClass(S):E.off():(E.on(),D()&&w.addClass(S))})),(J=$("main img[data-src]")).length<=0||(document.addEventListener("lazyloaded",(function(t){U($(t.target))})),J.each((function(){$(this).hasClass("ls-is-cached")&&U($(this))}))),$(".popup")<=0||$(".popup").magnificPopup({type:"image",closeOnContentClick:!0,showCloseBtn:!1,zoom:{enabled:!0,duration:300,easing:"ease-in-out"}}),dayjs.locale(Y.locale),dayjs.extend(window.dayjs_plugin_localizedFormat),$("[".concat(Y.attrTimestamp,"]")).each((function(){var t=dayjs.unix(Y.getTimestamp($(this))),e=t.format(Y.getDateFormat($(this)));$(this).text(e),$(this).removeAttr(Y.attrTimestamp),$(this).removeAttr(Y.attrDateFormat);var n=$(this).attr("data-bs-toggle");if(void 0!==n&&"tooltip"===n){var o=t.format("llll");$(this).attr("data-bs-title",o),new bootstrap.Tooltip($(this))}})),function(){if($(O).length){var t=new ClipboardJS(O,{target:function(t){return t.parentNode.nextElementSibling.querySelector("code .rouge-code")}});r(document.querySelectorAll(O)).map((function(t){return new bootstrap.Tooltip(t,{placement:"left"})})),t.on("success",(function(t){t.clearSelection();var e=t.trigger;I(e)||(!function(t){$(t).children().attr("class",F)}(e),function(t){var e=$(t).attr(N);$(t).attr(V,e).tooltip("show")}(e),z(e),setTimeout((function(){!function(t){$(t).tooltip("hide").removeAttr(V)}(e),function(t){$(t).children().attr("class",M)}(e),L(e)}),q))}))}var e=$("#copy-link");e.on("click",(function(t){var e=$(t.target);I(e)||navigator.clipboard.writeText(window.location.href).then((function(){var t=e.attr(V),n=e.attr(N);e.attr(V,n).tooltip("show"),z(e),setTimeout((function(){e.attr(V,t),L(e)}),q)}))})),e.on("mouseleave",(function(t){$(t.target).tooltip("hide"),console.log("mouse leave...")}))}(),document.querySelector("main h2")&&tocbot.init({tocSelector:"#toc",contentSelector:".content",ignoreSelector:"[data-toc-skip]",headingSelector:"h2, h3, h4",orderedList:!1,scrollSmooth:!1})}();
data/assets/js/pwa/sw.js CHANGED
@@ -9,82 +9,81 @@ self.importScripts('{{ "/assets/js/data/swcache.js" | relative_url }}');
9
9
  const cacheName = 'chirpy-{{ "now" | date: "%Y%m%d.%H%M%S" }}';
10
10
 
11
11
  function verifyDomain(url) {
12
- for (const domain of allowedDomains) {
13
- const regex = RegExp(`^http(s)?:\/\/${domain}\/`);
14
- if (regex.test(url)) {
15
- return true;
16
- }
12
+ for (const domain of allowedDomains) {
13
+ const regex = RegExp(`^http(s)?:\/\/${domain}\/`);
14
+ if (regex.test(url)) {
15
+ return true;
17
16
  }
17
+ }
18
18
 
19
- return false;
19
+ return false;
20
20
  }
21
21
 
22
22
  function isExcluded(url) {
23
- for (const item of denyUrls) {
24
- if (url === item) {
25
- return true;
26
- }
23
+ for (const item of denyUrls) {
24
+ if (url === item) {
25
+ return true;
27
26
  }
28
- return false;
27
+ }
28
+ return false;
29
29
  }
30
30
 
31
- self.addEventListener('install', event => {
32
- event.waitUntil(
33
- caches.open(cacheName).then(cache => {
34
- return cache.addAll(resource);
35
- })
36
- );
31
+ self.addEventListener('install', (event) => {
32
+ event.waitUntil(
33
+ caches.open(cacheName).then((cache) => {
34
+ return cache.addAll(resource);
35
+ })
36
+ );
37
37
  });
38
38
 
39
- self.addEventListener('activate', event => {
40
- event.waitUntil(
41
- caches.keys().then(keyList => {
42
- return Promise.all(
43
- keyList.map(key => {
44
- if (key !== cacheName) {
45
- return caches.delete(key);
46
- }
47
- })
48
- );
39
+ self.addEventListener('activate', (event) => {
40
+ event.waitUntil(
41
+ caches.keys().then((keyList) => {
42
+ return Promise.all(
43
+ keyList.map((key) => {
44
+ if (key !== cacheName) {
45
+ return caches.delete(key);
46
+ }
49
47
  })
50
- );
48
+ );
49
+ })
50
+ );
51
51
  });
52
52
 
53
53
  self.addEventListener('message', (event) => {
54
- if (event.data === 'SKIP_WAITING') {
55
- self.skipWaiting();
56
- }
54
+ if (event.data === 'SKIP_WAITING') {
55
+ self.skipWaiting();
56
+ }
57
57
  });
58
58
 
59
- self.addEventListener('fetch', event => {
60
- event.respondWith(
61
- caches.match(event.request).then(response => {
62
- if (response) {
63
- return response;
64
- }
59
+ self.addEventListener('fetch', (event) => {
60
+ event.respondWith(
61
+ caches.match(event.request).then((response) => {
62
+ if (response) {
63
+ return response;
64
+ }
65
65
 
66
- return fetch(event.request).then(response => {
67
- const url = event.request.url;
66
+ return fetch(event.request).then((response) => {
67
+ const url = event.request.url;
68
68
 
69
- if (event.request.method !== 'GET' ||
70
- !verifyDomain(url) ||
71
- isExcluded(url)) {
72
- return response;
73
- }
69
+ if (
70
+ event.request.method !== 'GET' ||
71
+ !verifyDomain(url) ||
72
+ isExcluded(url)
73
+ ) {
74
+ return response;
75
+ }
74
76
 
75
- /*
76
- see: <https://developers.google.com/web/fundamentals/primers/service-workers#cache_and_return_requests>
77
- */
78
- let responseToCache = response.clone();
77
+ /* see: <https://developers.google.com/web/fundamentals/primers/service-workers#cache_and_return_requests> */
78
+ let responseToCache = response.clone();
79
79
 
80
- caches.open(cacheName).then(cache => {
81
- /* console.log('[sw] Caching new resource: ' + event.request.url); */
82
- cache.put(event.request, responseToCache);
83
- });
80
+ caches.open(cacheName).then((cache) => {
81
+ /* console.log('[sw] Caching new resource: ' + event.request.url); */
82
+ cache.put(event.request, responseToCache);
83
+ });
84
84
 
85
- return response;
86
- });
87
- })
88
- );
85
+ return response;
86
+ });
87
+ })
88
+ );
89
89
  });
90
-
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-chirpy
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.2.0
4
+ version: 6.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cotes Chung