Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
TalkerApp notifications for webkit
javascript:(function(){window.notifications={notifications_support:function(){return%20true;},notify:function(obj){if(obj.title%20!=window.notifications.prevmsg.title%20%26%26%20obj.description%20!=window.notifications.prevmsg.description){var%20not=window.webkitNotifications.createNotification('http://talkerapp.com/images/favicon.png',obj.title,obj.description);not.show();window.setTimeout(function(){not.cancel();},5000);}window.notifications.prevmsg=obj;},prevmsg:{}};})();
window.notifications = {
notifications_support: function () {
return true;
},
notify: function (obj) {
if (obj.title != window.notifications.prevmsg.title && obj.description != window.notifications.prevmsg.description) {
var not = window.webkitNotifications.createNotification('http://talkerapp.com/images/favicon.png', obj.title, obj.description);
not.show();
window.setTimeout(function () {
not.cancel();
}, 5000);
}
window.notifications.prevmsg = obj;
},
prevmsg: {}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.