Skip to content

Instantly share code, notes, and snippets.

@mrkurt
Created October 13, 2009 21:05
Show Gist options
  • Save mrkurt/209552 to your computer and use it in GitHub Desktop.
Save mrkurt/209552 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Scrumy Unread Count
// @namespace http://fluidapp.com
// @description What does this do?
// @include *
// @author Someone
// ==/UserScript==
(function(){
if (window.fluid){
// Provides a simple API to get Wave information
FluidWave = {
getUnreadCount: function(){
var match = document.title.match(/\(([0-9]+)\)/);
return match ? match[1] : 0;
}
};
// Badge updating
setInterval(function(){
window.fluid.dockBadge = FluidWave.getUnreadCount() || null;
}, 1000);
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment