Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sri-rang/notifer.js
Not Actively Maintained - Javascript library for Gnome / Growl type non-blocking notifications
https://github.com/sri-rang/notifer.js
Last synced: about 2 months ago
JSON representation
Not Actively Maintained - Javascript library for Gnome / Growl type non-blocking notifications
- Host: GitHub
- URL: https://github.com/sri-rang/notifer.js
- Owner: sri-rang
- Archived: true
- Created: 2011-11-03T10:50:52.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2020-08-18T20:14:59.000Z (about 4 years ago)
- Last Synced: 2024-04-15T14:19:33.651Z (5 months ago)
- Language: HTML
- Homepage:
- Size: 116 KB
- Stars: 345
- Watchers: 15
- Forks: 38
- Open Issues: 4
-
Metadata Files:
- Readme: readme.markdown
Awesome Lists containing this project
README
## Warning
Master branch maybe *unstable*. The latest stable branch is [1.0.0](https://github.com/Srirangan/notifer.js/tree/1.0.0).## Notifier.js
Javascript library for Gnome / Growl type non-blocking notifications.## Links
* [Demo](http://www.srirangan.net/demos/notifier.js/index.html)
* [Download](https://github.com/downloads/Srirangan/notifer.js/notifier.js.zip)## Usage Guide
The master branch may be unstable from time to time. Use the downloadable archive for production.
Hack away, experiment on the master branch. Feel free to clone, fork and send pull requests.
## Include Jquery and Notifier.js
## Trigger Notifications
// Success notifs
Notifier.success('User registration successful')
Notifier.success('It\'s a boy!', 'Congrats!')// Info notifs
Notifier.info('You have been informed!')
Notifier.info('Tomorrow is another day', 'Words of wisdom')// Warning notifs
Notifier.warning('I warn you Ceasar!')
Notifier.warning('I warn you Ceasar!', 'Assassination Warning')// Error notifs
Notifier.error('Something may be wrong..')
Notifier.error('Something may be wrong..', 'Ummm..')// Notif with custom icon and timeout
Notifier.notify('Babe I\'m gonna leave you', 'Led Zeppelin', './icons/Music.png', 2000)// HTMLs are escaped, XSS attempts are blunted
Notifier.error('alert(\'xss attempt blunted\')')## Configure
Default behavior of NotifierJS can be modified without having to muddle through the code.
Here's an example of reducing the default timeout and changing the position of the notifications:
NotifierjsConfig.defaultTimeOut = 250;
NotifierjsConfig.position = ["bottom", "right"];