summaryrefslogtreecommitdiff
path: root/frontend
diff options
context:
space:
mode:
authoraltaf-creator <dev@altafcreator.com>2025-11-16 19:08:29 +0800
committeraltaf-creator <dev@altafcreator.com>2025-11-16 19:08:29 +0800
commit434aa8343fdcbb4d5002f934979913c099489bee (patch)
tree55bab4ec5a6151be57797d34f61faf5ea744471b /frontend
parent893c388d4e99442a36005e5971a87730623f946e (diff)
sdk, del
Diffstat (limited to 'frontend')
-rw-r--r--frontend/main.js6
1 files changed, 1 insertions, 5 deletions
diff --git a/frontend/main.js b/frontend/main.js
index 3f0ac8e..46341d6 100644
--- a/frontend/main.js
+++ b/frontend/main.js
@@ -2,11 +2,7 @@ const btn = document.getElementById("notbtn")
btn.addEventListener("click", () => requestPermission())
function requestPermission() {
console.log("Requesting permission...");
- Notification.requestPermission().then((permission) => {
- if (permission === "granted") {
- console.log("Notification permission granted.");
- }
- });
+ OneSignal.Notifications.requestPermission();
}
document.cookie = "session_key=0"