Author: | jaywcjlove |
---|---|
Views Total: | 14 views |
Official Page: | Go to website |
Last Update: | November 26, 2023 |
License: | MIT |
Preview:

Description:
iNotify.js is a standalone JavaScript library that sends important messages to end users by using audios, flashing page titles & favicons, and desktop notifications.
How to use it:
Import the iNotify.js into the webpage.
<script src="iNotify.js"></script>
The basic usage:
var iNotify = new iNotify({ message: 'Title Message', effect: 'flash', // flash | scroll openurl:"http://www.bing.com", // URL disableFavicon: false, onclick:function(){ console.log("---") }, //audio audio:{ file: ['msg.mp4','msg.mp3','msg.wav'] }, //interval in ms interval: 1000, //update favicon updateFavicon:{ textColor: "#fff", backgroundColor: "#2F9A00" }, //desktop notification notification:{ title:"Title", icon:"", body:'Message' } })
API methods.
// play audio iNotify.player() // close iNotify.close(); // autoplay iNotify.loopPlay() // stop audio iNotify.stopPlay() // set path to audio files iNotify.setURL('msg.mp3') iNotify.setURL(['msg.mp3','msg.ogg','msg.mp4']) // for title notification iNotify.setTitle(true) iNotify.setTitle('New title') iNotify.setTitle() iNotify.setInterval(2000) iNotify.addTimer() iNotify.clearTimer() // for desktop notification iNotify.notify({ title:"Tigle", body:"Message", openurl:"http://www.bing.com", onclick:function(){ console.log("---") } }); // for favicon notification iNotify.setFavicon(10) iNotify.faviconClear() // get title iNotify.init().title;
Changelog:
v2.1.3 (2023-11-26)
- update
v2.1.1/2 (2023-11-25)
- update dependencies
- bugfixes
v2.1.0 (2022-03-25)
- update
2022-03-24
- feat: add disableFavicon option
v2.0.12 (2018-12-05)
- Bugfix
v2.0.12 (2018-12-05)
- Bugfix
v2.0.11 (2018-10-25)
- Bugfix
v2.0.8 (2018-07-29)
- Modify the default value.
v2.0.7 (2018-07-17)
- Fix scrolling animation issue.