f849be7ec1ae99c0f5085af9b9837a33f7f7b8db
1 // https://developer.mozilla.org/en-US/docs/Web/API/notification
2 export function notify(title
, options
) {
3 if (Notification
.permission
=== "granted")
4 new Notification(title
, options
);
5 else if (Notification
.permission
!== 'denied') {
6 Notification
.requestPermission(function (permission
) {
7 if(!('permission' in Notification
))
8 Notification
.permission
= permission
;
9 if (permission
=== "granted")
10 var notification
= new Notification(title
, options
);