Skip to content

Instantly share code, notes, and snippets.

@robflaherty
Created January 10, 2014 15:14
Show Gist options
  • Select an option

  • Save robflaherty/8356089 to your computer and use it in GitHub Desktop.

Select an option

Save robflaherty/8356089 to your computer and use it in GitHub Desktop.
if (window.Notification) {
Notification.requestPermission(function() {
setTimeout(function(){
var n = new Notification('News Alert', {
'body' : 'S&P Surpasses 2000'
});
n.onclick = function() {
location.href = 'http://';
}
}, 2000);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment