Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
cybermajeed authored Sep 27, 2023
1 parent 65b5d38 commit 11a01b9
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,9 @@ function showNotification(periodNum, today) {
window.open(location.href, "_blank");
};
}
Notification.requestPermission().then((permission) => {
if (permission == "granted") {
setInterval(() => {
setInterval(() => {
Notification.requestPermission().then((permission) => {
if (permission == "granted") {
let hour = new Date().getHours(),
mins = new Date().getMinutes(),
secs = new Date().getSeconds(),
Expand Down Expand Up @@ -201,10 +201,9 @@ Notification.requestPermission().then((permission) => {
showNotification(1, days[today]);
}
}
}, 500);
} else if (permission == "denied") {
alert("Notification Blocked");
}
});

} else if (permission == "denied") {
alert("Notification Blocked");
}
});
}, 500);
//notify ends

0 comments on commit 11a01b9

Please sign in to comment.