summaryrefslogtreecommitdiff
path: root/frontend/start.js
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/start.js')
-rw-r--r--frontend/start.js5
1 files changed, 3 insertions, 2 deletions
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') {