swarmsim / swarm

Swarm Simulator, an idle game with lots of bugs.
https://www.swarmsim.com
GNU General Public License v3.0
492 stars 140 forks source link

html5 notifications for upgrades-available #441

Open erosson opened 9 years ago

erosson commented 9 years ago

https://developer.mozilla.org/en-US/docs/Web/API/notification

optionally show one of these when a new upgrade's available! should have the notification-checkbox on it, for easy silencing. #350's probably a prerequisite to keep notifications relevant, too.

especially useful for Kongregate users, because they don't get to see waiting-upgrade-count in their favicon. (I wonder how third-party iframes work with these notifications, though.)

erosson commented 9 years ago

from #668: https://developer.chrome.com/extensions/notifications , https://developer.apple.com/notifications/safari-push-notifications/ , https://wiki.ubuntu.com/NotifyOSD

ghost commented 9 years ago

Doing some more research, I found a paid service offering push notification services, but then I found a Chrome Javascript Push Notification Example. Then, I found a tutorial that looks like it will work in most browsers using JavaScript. I hope this helps you guys get this working. I may explore the code myself and maybe try to integrate this into the application myself and pull request it.