mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2025-04-20 07:05:05 -04:00
Cleanup; fix STUN servers
This commit is contained in:
parent
e9eeea48e5
commit
6317c25b10
3 changed files with 19 additions and 17 deletions
|
@ -335,8 +335,8 @@ class Notifications {
|
|||
constructor() {
|
||||
// Check if the browser supports notifications
|
||||
if (!('Notification' in window)) return;
|
||||
|
||||
// Check whether notification permissions have already been granted
|
||||
|
||||
if (Notification.permission !== 'granted') {
|
||||
this.$button = $('notification');
|
||||
this.$button.removeAttribute('hidden');
|
||||
|
@ -364,6 +364,7 @@ class Notifications {
|
|||
vibrate: [200, 100, 200, 100, 200, 100, 400],
|
||||
}
|
||||
if (serviceWorker && serviceWorker.showNotification) {
|
||||
// android doesn't support "new Notification" if service worker is installed
|
||||
return serviceWorker.showNotification(message, config);
|
||||
} else {
|
||||
return new Notification(message, config);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue