Last active
December 14, 2015 23:29
-
-
Save danilopopeye/5165584 to your computer and use it in GitHub Desktop.
Jenkins failed projects badge on Fluidapp
This file contains hidden or 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
// ==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 : ''; | |
}; | |
} | |
}()); |
Author
danilopopeye
commented
Mar 20, 2013
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment