Skip to content

Instantly share code, notes, and snippets.

@bsatrom
Created June 10, 2011 18:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bsatrom/1019372 to your computer and use it in GitHub Desktop.
Save bsatrom/1019372 to your computer and use it in GitHub Desktop.
setInterval(function () {
$.getJSON('Photo/CommentsForUser/' + new Date().getTime() , function (data) {
$.pinify.clearOverlay();
var itemList = [];
var commentCount = parseInt($('#commentCount').val());
if (data.length > commentCount) {
$('#commentCount').val(data.length);
$.pinify.flashTaskbar();
$.pinify.addOverlay({
title: 'New comment: ' + data[0].text + ' (' + data[0].date + ')',
icon: '/Content/Images/comment.ico'
});
}
});
}, 5000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment