Categories: CSSScriptWeb Design

Multifunctional Audio / System /Favicon / Title Notification Library – iNotify.js

iNotify.js is a standalone JavaScript library that sends important messages to end users by using audios, flashing page titles & favicons, and desktop notifications.

Table of Contents

Toggle

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.4 (2025-10-11)

  • update

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.

The post Multifunctional Audio / System /Favicon / Title Notification Library – iNotify.js appeared first on CSS Script.

rssfeeds-admin

Share
Published by
rssfeeds-admin

Recent Posts

Planned Sydney Sweeney Cameo Reportedly Chopped from The Devil Wears Prada 2

A short scene featuring Sydney Sweeney has reportedly been left out of the final cut…

12 minutes ago

Planned Sydney Sweeney Cameo Reportedly Chopped from The Devil Wears Prada 2

A short scene featuring Sydney Sweeney has reportedly been left out of the final cut…

13 minutes ago

Vanilla JS Offcanvas Side Menu – Mobile Swipe Menu

Mobile Swipe Menu is a vanilla JavaScript library that creates touch-enabled off-canvas side menus for…

2 hours ago

Add UI Sound Effects to Web Apps With Tiks and Web Audio API

tiks is a JavaScript sound effect library that generates iOS-like UI audio feedback at runtime…

2 hours ago

New Bills Aim to Boost Housing Supply Across Michigan

LANSING, MI (WOWO) A broad coalition of business groups, housing advocates and environmental organizations is…

2 hours ago

Michigan Lawmakers Advance Mental Health Reform Efforts

LANSING, MI (WOWO) Michigan lawmakers are advancing a series of proposals aimed at reforming the…

2 hours ago

This website uses cookies.