add checkbox to disable web push
This commit is contained in:
parent
ee70ec4c7e
commit
02c0e15781
8 changed files with 50 additions and 984 deletions
|
@ -1,3 +1,5 @@
|
|||
import runtime from 'serviceworker-webpack-plugin/lib/runtime'
|
||||
|
||||
function urlBase64ToUint8Array (base64String) {
|
||||
const padding = '='.repeat((4 - base64String.length % 4) % 4)
|
||||
const base64 = (base64String + padding)
|
||||
|
@ -13,7 +15,7 @@ function isPushSupported () {
|
|||
}
|
||||
|
||||
function registerServiceWorker () {
|
||||
return navigator.serviceWorker.register('/static/sw.js')
|
||||
return runtime.register()
|
||||
.catch((err) => console.error('Unable to register service worker.', err))
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue