diff --git a/scripts/SettingsController.js b/scripts/SettingsController.js index b0b6e97..e4161e3 100644 --- a/scripts/SettingsController.js +++ b/scripts/SettingsController.js @@ -28,7 +28,8 @@ angular.module('flashy.SettingsController', ['ui.router']). } console.log("gonna try to launch service worker now"); - navigator.serviceWorker.register('scripts/service-worker.js').then( + if ('serviceWorker' in navigator) { + navigator.serviceWorker.register('scripts/service-worker.js').then( function(serviceWorkerRegistration) { serviceWorkerRegistration.pushManager.subscribe().then( function(pushSubscription) { @@ -46,4 +47,10 @@ angular.module('flashy.SettingsController', ['ui.router']). } ); }); + + } else { + console.log('Service workers aren\'t supported in this browser.'); + } + + }); diff --git a/templates/settings.html b/templates/settings.html index 59f0ff2..3edca7e 100644 --- a/templates/settings.html +++ b/templates/settings.html @@ -1,13 +1,17 @@
- Check this to enable notifications
+ +
+ + +

Change Password

-