Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jeroendesloovere/safari-local-notifications-api

This jQuery Safari Local Notifications class can send local notifications to the visitors of your website.
https://github.com/jeroendesloovere/safari-local-notifications-api

Last synced: 6 days ago
JSON representation

This jQuery Safari Local Notifications class can send local notifications to the visitors of your website.

Awesome Lists containing this project

README

        

# Safari Local Notifications API

This jQuery Safari Local Notifications class can send local notifications to the Safari visitors of your website.

## Example

``` html

var title = 'message-title';
var body = 'message-body';
var tag = 'my-unique-tag-01';

// define callback functions
var callbackFunctions = {
'onshow': myCustomFunction,
'onclick': myCustomFunction,
'onclose': myCustomFunction,
'onerror': myCustomFunction
};

// trigger a notification to be shown
return localNotifications.post(
title,
body,
tag,
callbackFunctions
);

function myCustomFunction()
{
alert('Action done');
}

```
[Check full source code for example](/examples)

## Contributing

It would be great if you could help us improve this class. GitHub does a great job in managing collaboration by providing different tools, the only thing you need is a [GitHub](http://github.com) login.

* Use **Pull requests** to add or update code
* **Issues** for bug reporting or code discussions
* Or regarding documentation and how-to's, check out **Wiki**
More info on how to work with GitHub on help.github.com.

## License

The module is licensed under [MIT](./LICENSE.md). In short, this license allows you to do everything as long as the copyright statement stays present.