From 182720dc2e9bcdc780194307629157efbb9d8578 Mon Sep 17 00:00:00 2001 From: altaf-creator Date: Mon, 1 Dec 2025 18:02:59 +0700 Subject: testing; don't bother reading the docs --- frontend/start.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'frontend') diff --git a/frontend/start.js b/frontend/start.js index f79033d..21c5a6d 100644 --- a/frontend/start.js +++ b/frontend/start.js @@ -10,9 +10,10 @@ startUpdateMachines(); const notbtn = document.getElementById("notbtn") notbtn.addEventListener("click", () => requestPermission()) -function requestPermission() { +async function requestPermission() { console.log("Requesting permission..."); - OneSignal.Notifications.requestPermission(); + const onesig_res = await OneSignal.Notifications.requestPermission(); + alert(onesig_res); } const notif = document.getElementById("notif-panel"); if (Notification.permission == 'granted') { -- cgit v1.2.3