1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-03-09 15:40:18 +00:00

More web push progress.

This commit is contained in:
Ylian Saint-Hilaire 2021-02-09 12:24:12 -08:00
parent 4ee866ca11
commit 50185dac86
3 changed files with 42 additions and 1 deletions

View file

@ -13842,6 +13842,7 @@
//
function setupServiceWorker() {
if ((features2 & 8) == 0) return; // Web push not enabled on this server
if ((typeof serverinfo.vapidpublickey != 'string') || (Notification == null) || (Notification.permission != 'granted')) return;
// Register the service worker
if ('serviceWorker' in navigator) {