From 83d0512fbd00b06c186ea3e8ca84925ec17330f3 Mon Sep 17 00:00:00 2001 From: Mystikfluu Date: Sat, 23 Jul 2022 01:17:07 +0200 Subject: [PATCH] implement #20 to some extent --- js/posts.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/posts.js b/js/posts.js index ca8a438..65da2ec 100644 --- a/js/posts.js +++ b/js/posts.js @@ -240,8 +240,11 @@ async function mainNoti(user) { await askNotiPerms() } else { if(cansendNoti) { - let notification = new Notification('IPost', { body: "new message posted from " + user }); + let notification = new Notification('IPost', { body: "new message posted from " + user , tag: "new_post"}); notification = await notification + notification.addEventListener("click",function(){ + notification.close() + }) console.log(notification); } }