Notify is a Jetpack feature that allows any website to send Growl or other system notifications through Jetpack. These notifications will appear whether you're on a different tab or even if you're not currently using Firefox (as long as it's still open).
Instructions
First, install the Firefox Jetpack add-on if you haven't already. Once you have the plugin installed, Firefox should have automatically detected and prompted you to install the jetpack. Click install and that's all you need to do. As websites implement the functionality, you'll start receiving the notifications that they send.
After installing the jetpack, click the button to see how it works:
If you're a developer, read on to see how to send notifications from your site.
Developers
If you want to send notifications from your site and you're using jQuery, I've created a plugin to make sending notifications dead simple. Just include the plugin and do the following:, all you have to do is call the following function:
// Pass in notification object - {title: '', body: '', icon: ''}
jetpackNotify({title: 'Notification title',
body: 'Longer notification description',
icon: 'http://www.firefox.com/favicon.ico'});
// You can check if they have Notify installed
// by checking for the existence of the function
if (jetpackNotify !== undefined)
{
// Notify is installed ... do stuff
}
All the code is available on Github
Changelog
- v1.1 - Overhauled and simplified, removed need for jQuery plugin and custom event. Can now just call a jetpackNotify function in the global namespace
- v1.0 - Initial release. Utilizes a custom event and reading data from hidden DOM element
License
This jetpack and plugin are licensed under the MIT License. You can use it for free in personal or commercial projects.
Contact/Feedback
If you find any bugs, please report them using the Github issue tracker. If you have any questions/suggestions or you implement this in your site, let me know - me (at) zachwaugh.com, or @zachwaugh
ELSEWHERE...