Skip to content

Instantly share code, notes, and snippets.

@danilopopeye
Last active December 14, 2015 23:29
Show Gist options
  • Save danilopopeye/5165584 to your computer and use it in GitHub Desktop.
Save danilopopeye/5165584 to your computer and use it in GitHub Desktop.
Jenkins failed projects badge on Fluidapp
// ==UserScript==
// @name Jenkins CI
// @namespace http://fluidapp.com
// @description Jenkins failed projects badge on Fluidapp
// @include http://your-jenins-project.com
// @author Danilo Sousa <[email protected]>
// ==/UserScript==
(function () {
if (window.fluid) {
window.fluid.dockBadge = '';
setTimeout(updateDockBadge, 1000)
setInterval(updateDockBadge, 5000);
function updateDockBadge() {
var errors = jQuery('#projectstatus td img[tooltip][alt=Failed]').size();
window.fluid.dockBadge = errors > 0 ? errors : '';
};
}
}());
@danilopopeye
Copy link
Author

example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment