diff options
Diffstat (limited to 'frontend/start.js')
| -rw-r--r-- | frontend/start.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/frontend/start.js b/frontend/start.js new file mode 100644 index 0000000..f760f11 --- /dev/null +++ b/frontend/start.js @@ -0,0 +1,12 @@ +document.getElementById("startbtn").addEventListener("click", () => { + start(); +}); +startUpdateMachines(); + +const notbtn = document.getElementById("notbtn") +notbtn.addEventListener("click", () => requestPermission()) +function requestPermission() { + console.log("Requesting permission..."); + OneSignal.Notifications.requestPermission(); +} +const notif = document.getElementById("notif-panel"); |
