Chrome Notification

by Tim McKay

HTML

<button onclick="notifyMe()">
  Notify me!
</button>

JavaScript

function notifyMe() {
  if (!Notification) {
    alert('Notifications are supported in modern versions of Chrome, Firefox, Opera and Firefox.'); 
    return;
  }

  if (Notification.permission !== "granted")
    Notification.requestPermission();

  var notification = new Notification('Front-End Standup', {
    icon: 'http://icons.iconarchive.com/icons/dtafalonso/android-l/256/Hangouts-icon.png',
    body: "Status Call with Front-end team",
    imageUrl: ''
  });

  notification.onclick = function () {
    window.open("https://goo.gl/gDj5nc");
  };
}