diff options
| author | altaf-creator <dev@altafcreator.com> | 2025-11-16 19:08:29 +0800 |
|---|---|---|
| committer | altaf-creator <dev@altafcreator.com> | 2025-11-16 19:08:29 +0800 |
| commit | 434aa8343fdcbb4d5002f934979913c099489bee (patch) | |
| tree | 55bab4ec5a6151be57797d34f61faf5ea744471b /frontend/main.js | |
| parent | 893c388d4e99442a36005e5971a87730623f946e (diff) | |
sdk, del
Diffstat (limited to 'frontend/main.js')
| -rw-r--r-- | frontend/main.js | 6 |
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" |
