GitXplorerGitXplorer
v

notify.js

public
1 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
bbeb95f9c3efd040cbfd0e90ab07695c0085bc24

there is no cancel() in chrome since 37(?)

vvitalyster committed 9 years ago
Unverified
bcfed69779ac85033425d2a04df2ce718f0cb111

Auto-cancel notices on chrome

llegastero committed 11 years ago
Unverified
2e5fa5b7626583cc90f1915bef7946ed7cd73a84

Also auto-cancel notices, because chrome doesn't

llegastero committed 11 years ago
Unverified
ec5326493e91ce12daad4e386c71b9273e5b7fac

Make webkit notifications fade out like standard ones.

llegastero committed 11 years ago
Unverified
23176087dfe4388bc1f855300610115f5677a1e9

Add README

llegastero committed 11 years ago
Unverified
41e3986b52d2e4681922bd7adeda06be1ae4d855

initial

llegastero committed 11 years ago

README

The README file for this repository.

Notify.js

What is it?

A wrapper for using the Desktop Notifications API, along with the previous webkit prefixed version.

It also uses the Growl notification APIs provided through MacGap or Fluid.

Examples

var Notifify = require('notify', );

var notifications = new Notify({/* default opts */}, {
    // Fallback options

    create: function (title, opts) {
        // Fallback custom notification handler if
        // desktop notifications are not supported.
    }
});

if (notifications.permissionNeeded()) {
    $('button').click(function () {
       notifications.requestPermission(function (perm) {
           if (perm === 'granted') {
               console.log('Got permission!');
           }
       });
    });
}

if (notifications.allowed()) {
    notifications.create('This is a notification', {
       body: 'It has some more description',
       tag: 'replaces-the-previous-one-with-the-same-tag',
       icon: '/images/applogo.png'
    });
}

License

MIT

Credits

If you like this, follow @lancestout on twitter.