- Since:
- TODO
-
- Clean up Notification loading process
Examples
// Show an update notification
jMod.Notification('UpdateNotification', {
'version': '1.2.3', // The new version
'script_name': 'foo bar', // Optional
'time': '123 minutes ago',
'visit': {
'onClick': function(e){
console.log('Visit Clicked!!', e);
e.stopPropagation();
return false;
}
}
});
// Manually show a small notification
jMod.Notification({
'title': 'Anti-Pagination v0.0.14 Available!',
'body': '<i class="fa fa-clock-o"></i> <i>2 hours ago...</i>',
'footer': '<a class="btn btn-success btn-sm" href="javascript:void(0);" onClick="console.log(\'a btn click\');(arguments[0] || window.event).stopPropagation();return false;">Install</a>'+
'<a class="btn btn-primary btn-sm" href="javascript:void(0);" target="_blank">Visit Page</a>'+
'<a class="btn btn-danger btn-sm" href="javascript:void(0);">Close</a>', // Optional
'icon': 'fa-download',
'type': 'small',
'onBeforeClose': tOnBeforeCloseCB, // Optional
'onAfterClose': tOnAfterCloseCB // Optional
});