blob: 51041fe0046293b152eca1aad8766e34e261360a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
const btn = document.getElementById("notbtn")
btn.addEventListener("click", () => requestPermission())
function requestPermission() {
console.log("Requesting permission...");
OneSignal.Notifications.requestPermission();
}
document.cookie = "session_key=0"
const data = {
duration: 2,
block: 1,
machine: 2,
}
//fetch("http://localhost:8000/start", {
// credentials: "include",
// method: "POST",
// headers: {
// "Content-Type": "application/json"
// },
// body: JSON.stringify(data)
//});
|