If you're like me who uses Safari, and finds Gmail in browser most comfortable to use, you might want to enable notification from Gmail in Safari 6. Notification Center in Mountain Lion does support websites in Safari to send notifications, but by now Gmail does not ask for permission to send notifications. Fortunately Gmail uses html5 notification, which is supported in Safari 6. We can manually request permission from Safari for Gmail.
- Enable Develop menu. Safari->Preferences->Advanced: Check "Show Develop menu in menu bar".
- Open
mail.google.com
. - Develop->Show Web Inspector. The console will show at bottom. Paste in following command in the console and press Enter. [1]
window.webkitNotifications.requestPermission(function(){alert(window.webkitNotifications.checkPermission());})
- If the alert box shows
0
, it meansmail.google.com
successfully gets notification permission. Send yourself an email with a different email address to test.
[1] Code stole from http://dangercove.github.com/html5-notifications/
That's nice. But there's other problem still remaining. Notification stays for few seconds and then go away both from upper right corner, which is OK, and from the Notification Center, which is sad. So when you disable notifications, you're not going to see them stored in the notification panel for later review.
The same with Google Chrome. But there's a plugin "Checker Plus for Gmail" (https://chrome.google.com/webstore/detail/oeopbcgkkoapgobdbedcemjljbihmemj) which solves the problem. It uses Desktop Notifications as well, so they appear in Notification Center, but you can also set "Close After" option to "Never" and have them in Notification Center till you click or delete them. It's not affecting the upper right popup banner though, so it's gone in a few seconds as it should be.
So, is there any default timeout in webkitNotifications, which you can set, or any other workaround?