Totally automated notifications.js by taking event handling code functions as parameters to the notify() function