request notification permission on click
parent
959eada2dc
commit
6bdd7cc93e
|
@ -293,8 +293,6 @@
|
|||
const $toggle = $('#notify-toggle'),
|
||||
isVisible = () => $('#notify-app').is(':visible');
|
||||
|
||||
if ('Notification' in window) Notification.requestPermission();
|
||||
|
||||
const load = function(data, incoming) {
|
||||
if (booted) return;
|
||||
booted = true;
|
||||
|
@ -322,6 +320,7 @@
|
|||
};
|
||||
|
||||
$toggle.one('mouseover click', () => load()).click(() => {
|
||||
if ('Notification' in window) Notification.requestPermission();
|
||||
setTimeout(() => {
|
||||
if (instance && isVisible()) instance.setVisible();
|
||||
}, 200);
|
||||
|
|
Loading…
Reference in New Issue