Created
October 3, 2011 16:49
-
-
Save benburton/1259574 to your computer and use it in GitHub Desktop.
Trello Userscript for Fluid
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
$(document).ready(function(){ | |
window.fluid.dockBadge = ''; | |
var previousText; | |
var newPostCount = 0; | |
setInterval(function() { | |
var latestText = $('.list-actions .phenom-desc:first').text(); | |
if (!previousText) { | |
previousText = latestText; | |
} | |
if (previousText != latestText) { | |
newPostCount += 1; | |
window.fluid.dockBadge = newPostCount; | |
previousText = latestText; | |
window.fluid.showGrowlNotification({ | |
title: 'New Trello Activity', | |
description: latestText, | |
priority: 1, | |
sticky: false, | |
identifier: 'trello', | |
onclick: function() { | |
window.fluid.activate(); | |
window.fluid.dockBadge = ''; | |
}, | |
icon: 'http://trello.com/images/favicon.png' | |
}); | |
} | |
}, 5000); | |
$('*').click(function() { | |
newPostCount = 0; | |
window.fluid.dockBadge = ''; | |
}); | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment