jekyll-theme-chirpy 5.2.0 → 5.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/_config.yml +1 -0
- data/_sass/jekyll-theme-chirpy.scss +1 -1
- data/assets/js/dist/categories.min.js +1 -1
- data/assets/js/dist/commons.min.js +1 -1
- data/assets/js/dist/home.min.js +1 -1
- data/assets/js/dist/misc.min.js +1 -1
- data/assets/js/dist/page.min.js +1 -1
- data/assets/js/dist/post.min.js +1 -1
- data/assets/js/dist/pvreport.min.js +1 -1
- data/assets/js/pwa/app.js +19 -32
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 07ec420e8199940db60a4b2fb5f9d273cd5a0cd5c5bdcc7b071abf9b1e53d5e9
|
|
4
|
+
data.tar.gz: 9484cb86c473e6f55f64c2db905089c8d2a4bc2dd710115053c87ea64f160cf0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bc7eb42cdb855cf88243105edf51e9a469a0981cbb15fa9212a65205d55916baeb22d83e646251941840bbb4ba78d2cba8def925ceaa3a3c25302a41ce9f5250
|
|
7
|
+
data.tar.gz: 03af5049961e1eddab3b029d54fe0780ac8f466ea7983b538bbe1ae2f508c964535d00ad654313d8dfff387693e8cac30a7e82a5b75ab68cc35c3110b185c956
|
data/_config.yml
CHANGED
data/assets/js/dist/home.min.js
CHANGED
data/assets/js/dist/misc.min.js
CHANGED
data/assets/js/dist/page.min.js
CHANGED
data/assets/js/dist/post.min.js
CHANGED
data/assets/js/pwa/app.js
CHANGED
|
@@ -3,50 +3,37 @@ layout: compress
|
|
|
3
3
|
permalink: '/app.js'
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
const keyWaiting = 'sw-waiting';
|
|
7
6
|
const $notification = $('#notification');
|
|
8
7
|
const $btnRefresh = $('#notification .toast-body>button');
|
|
9
8
|
|
|
10
|
-
function skipWating(registration) {
|
|
11
|
-
registration.waiting.postMessage('SKIP_WAITING');
|
|
12
|
-
localStorage.removeItem(keyWaiting);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
9
|
if ('serviceWorker' in navigator) {
|
|
16
10
|
/* Registering Service Worker */
|
|
17
11
|
navigator.serviceWorker.register('{{ "/sw.js" | relative_url }}')
|
|
18
12
|
.then(registration => {
|
|
19
|
-
if (registration) {
|
|
20
|
-
registration.addEventListener('updatefound', () => {
|
|
21
|
-
let serviceWorker = registration.installing;
|
|
22
|
-
|
|
23
|
-
serviceWorker.addEventListener('statechange', () => {
|
|
24
|
-
if (serviceWorker.state === 'installed') {
|
|
25
|
-
if (navigator.serviceWorker.controller) {
|
|
26
|
-
$notification.toast('show');
|
|
27
|
-
/* in case the user ignores the notification */
|
|
28
|
-
localStorage.setItem(keyWaiting, true);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
});
|
|
33
13
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
14
|
+
/* in case the user ignores the notification */
|
|
15
|
+
if (registration.waiting) {
|
|
16
|
+
$notification.toast('show');
|
|
17
|
+
}
|
|
38
18
|
|
|
39
|
-
|
|
19
|
+
registration.addEventListener('updatefound', () => {
|
|
20
|
+
registration.installing.addEventListener('statechange', () => {
|
|
40
21
|
if (registration.waiting) {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
/* closed all open pages after receiving notification */
|
|
45
|
-
localStorage.removeItem(keyWaiting);
|
|
22
|
+
if (navigator.serviceWorker.controller) {
|
|
23
|
+
$notification.toast('show');
|
|
24
|
+
}
|
|
46
25
|
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
$btnRefresh.click(() => {
|
|
30
|
+
if (registration.waiting) {
|
|
31
|
+
registration.waiting.postMessage('SKIP_WAITING');
|
|
47
32
|
}
|
|
48
|
-
|
|
49
|
-
|
|
33
|
+
$notification.toast('hide');
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
);
|
|
50
37
|
|
|
51
38
|
let refreshing = false;
|
|
52
39
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: jekyll-theme-chirpy
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 5.2.
|
|
4
|
+
version: 5.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Cotes Chung
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-06-
|
|
11
|
+
date: 2022-06-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: jekyll
|