shared/scripts/lib/notifications.js
/**
 * Allows to create notification manually, used for thresholdreminders
 */
Allows to create notification manually, used for thresholdreminders
Allows to create notification manually used for thresholdreminders
function notify(name, type, amount) {
  if (environment === 'chrome') {
    chrome.notifications.create(name, {
      type: 'basic',
      iconUrl: '../img/logo64.png',
      title: 'Tipsy',
      message: 'Time to donate! You have reached your '+ type + ' threshold with an amount of $' + amount + '.'
    }, function unhandledCallback() {});
    addClickable();
  } else if (environment === 'firefox') {
    console.error('Threshold notification for Firefox not yet implemented.');
  }
}
function notify ( name , type , amount ) { if ( environment === 'chrome' ) { chrome . notifications . create ( name , { type : 'basic' , iconUrl : '../img/logo64.png' , title : 'Tipsy' , message : 'Time to donate! You have reached your ' + type + ' threshold with an amount of $' + amount + '.' } , function unhandledCallback ( ) { } ) ; addClickable ( ) ; } else if ( environment === 'firefox' ) { console . error ( 'Threshold notification for Firefox not yet implemented.' ) ; } }
Allows to create notification manually, used for thresholdreminders
Allows to create notification manually used for thresholdreminders
//TODO implement me