Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/jeroendesloovere/safari-local-notifications-api
- Owner: jeroendesloovere
- License: mit
- Created: 2014-01-08T12:55:03.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2014-09-25T06:54:24.000Z (over 10 years ago)
- Last Synced: 2024-11-11T06:49:51.247Z (about 2 months ago)
- Language: JavaScript
- Homepage: http://jeroendesloovere.be
- Size: 215 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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.