Created
February 14, 2014 04:47
-
-
Save arvindsv/8995975 to your computer and use it in GitHub Desktop.
TamperMonkey script for showing status, on mouseover of stage bar, on the dashboard of ThoughtWorks' Go.
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 GoShowStatus | |
// @namespace http://unique.namespace.for.go/ | |
// @version 0.1 | |
// @description Show status on mouseover of stage bar, in ThoughtWorks Go. | |
// @match http://your.go.server:8153/* | |
// @copyright 2014, Aravind SV | |
// ==/UserScript== | |
(function() { | |
var bindToShowStatus = function() { | |
jQuery(".stage_bar").off( "mouseenter mouseleave" ); | |
jQuery(".stage_bar").mouseenter(function(e) { | |
var bar = jQuery(e.currentTarget); | |
bar.text(bar.attr("class").split(/\s+/)[1]); | |
bar.data("color", bar.css("background-color")); | |
bar.css("background-color", "#fff"); | |
}).mouseleave(function (e) { | |
var bar = jQuery(e.currentTarget); | |
bar.text(""); | |
bar.css("background-color", bar.data("color")); | |
}); | |
}; | |
jQuery(document).bind("dashboard-refresh-completed", function (e, notModified) { | |
bindToShowStatus(); | |
}); | |
bindToShowStatus(); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment