From 043ffb42ca85c457d90c2b1cb03532d752d2cfc3 Mon Sep 17 00:00:00 2001 From: Booteille Date: Thu, 14 Nov 2024 19:20:23 +0100 Subject: [PATCH] remove unnecessary variable --- themes/default/public/js/lufi-notifications.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/themes/default/public/js/lufi-notifications.js b/themes/default/public/js/lufi-notifications.js index 2931cf5..689a730 100644 --- a/themes/default/public/js/lufi-notifications.js +++ b/themes/default/public/js/lufi-notifications.js @@ -9,15 +9,14 @@ const notify = (title, body) => { if (Notification.permission !== "granted") { Notification.requestPermission(); } else { - let options = { - body: body, + new Notification(title, { + body, icon: "/img/lufi196.png", - }; - new Notification(title, options); + }); } }; -document.addEventListener("DOMContentLoaded", function () { +document.addEventListener("DOMContentLoaded", () => { if (!"Notification" in window || typeof Notification === "undefined") { return; }