diff options
author | Mario <mario@mariovavti.com> | 2021-06-25 10:53:37 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2021-06-25 10:53:37 +0000 |
commit | 4f328740dc5f2492b33ee2953e8bad2b84b98243 (patch) | |
tree | 7371e71618477164895830f702f4a6f504d8fc4a /view/js/main.js | |
parent | 2f1c2f42b1e27e5ae7fc7f82f6118517d087fdba (diff) | |
download | volse-hubzilla-4f328740dc5f2492b33ee2953e8bad2b84b98243.tar.gz volse-hubzilla-4f328740dc5f2492b33ee2953e8bad2b84b98243.tar.bz2 volse-hubzilla-4f328740dc5f2492b33ee2953e8bad2b84b98243.zip |
more work on notifications
Diffstat (limited to 'view/js/main.js')
-rw-r--r-- | view/js/main.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/view/js/main.js b/view/js/main.js index a286d53bf..9ab66833c 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -1737,22 +1737,23 @@ function push_notification_request(e) { else if (Notification.permission !== 'granted') { Notification.requestPermission(function(permission) { if(permission === 'granted') { - $(e.target).closest('button').hide(); + $(e.target).closest('div').hide(); } }); } } -function push_notification(body, title) { +function push_notification(title, body, href) { let options = { body: body, + data: href, icon: '/images/hz-64.png', silent: false } let n = new Notification(title, options); - n.onclick = function (event) { - setTimeout(n.close.bind(n), 300); + n.onclick = function (e) { + window.location.href = e.target.data; } } |