Security News
The Push to Ban Ransom Payments Is Gaining Momentum
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
notificationsjs
Advanced tools
Readme
Coming soon...
var pusher = new Pusher(...);
var notifications = new Notifications({
// where to place notifications
targetDOMElement: '#notifications',
// close after X millseconds
closeAfter: 5000,
// how many notifications to show at once:
showMax: 5,
// array of classes to give each notification
notificationClasses: ['my-notification'],
// function called when a message is closed
onClose: function(message) {...}
// function called when a new message is shown
onShow: function(message) {...}
// optional, but if set will render notifications from events on a Pusher channel
pusher: {
instance: pusher,
channelName: 'notifications',
eventName: 'new-notification',
// used to tell Notification.js what string to show in the notification, from the Pusher event
// you could also return a DOM Element here instead
transform: function(event) {
return 'New message: ' + event.text;
}
}
});
// if you're not using Pusher, you'll get an API to send messages to:
// this will add the new message and immediately show it
notifications.push('This is a new message');
// general API
notifications.getLatest(); // get the latest message
notifications.getAll(); // get an array of all the messages
notifications.clear(); // remove all notifications
notifications.onNewMessage(function() {
// do something when a new message is added
// this will be useful for hooking into other libraries (React, etc)
});
FAQs
Coming soon...
We found that notificationsjs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
Application Security
New SEC disclosure rules aim to enforce timely cyber incident reporting, but fear of job loss and inadequate resources lead to significant underreporting.
Security News
The Python Software Foundation has secured a 5-year sponsorship from Fastly that supports PSF's activities and events, most notably the security and reliability of the Python Package Index (PyPI).