Skip to content

Instantly share code, notes, and snippets.

@arvindsv
Created February 14, 2014 04:47
Show Gist options
  • Save arvindsv/8995975 to your computer and use it in GitHub Desktop.
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.
// ==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