Skip to content

Commit 64d2b41

Browse files
committed
fix - trial: improve mobile datetime visibility and formatting
1 parent f5ecdf5 commit 64d2b41

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

js/pushNotificationsHandler.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@ window.addEventListener("load", () => {
77

88

99
// Push Notifications
10+
// Always ask the user for permission when called (e.g. when they click Enable Notifications)
1011
async function requestNotificationPermission() {
11-
if (!("Notification" in window)) return;
12-
13-
if (Notification.permission === "granted") return;
12+
if (!("Notification" in window)) return false;
1413

1514
const permission = await Notification.requestPermission();
1615
if (permission === "granted") return true;

0 commit comments

Comments
 (0)