New feature: PWA

This commit is contained in:
Cotes Chung
2020-05-10 00:28:18 +08:00
parent b64598358d
commit d8e45694bd
10 changed files with 266 additions and 66 deletions

12
app.js Normal file
View File

@@ -0,0 +1,12 @@
---
layout: compress
# Chirpy v2.2
# https://github.com/cotes2020/jekyll-theme-chirpy
# © 2020 Cotes Chung
# MIT Licensed
---
/* Registering Service Worker */
if('serviceWorker' in navigator) {
navigator.serviceWorker.register('{{ "/sw.js" | relative_url }}');
};