Skip to content

Instantly share code, notes, and snippets.

@btrepp
Created November 29, 2016 01:39
Show Gist options
  • Save btrepp/f7560c2e8e2e746767000ff406caa357 to your computer and use it in GitHub Desktop.
Save btrepp/f7560c2e8e2e746767000ff406caa357 to your computer and use it in GitHub Desktop.
Octopus deploy behind highlighting
// ==UserScript==
// @name Octopus Highlighting
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://octopus.sdev.psn.corp.riotinto.org/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
var update=function() {
$("tr").each(function( index ) {
var project = $(this).find("a[class='project-name']");
var stage = $(this).find("td[id^='Environments-2__']").find("span[class='version']");
var production = $(this).find("td[id^='Environments-1__']").find("span[class='version']");
if (stage.text() !== "") {
if (stage.text() != production.text() && ($(this).find("span[class='status Success']").length>0) ) {
$(this).find("td[id^='Environments-1__'] .status").css('background-color', '#FFFF66')
.css('color','black');
$(this).find("td[id^='Environments-1__']").find('i').removeClass("fa-check").addClass("fa-refresh");
}
}
});
setTimeout(update,2000);
};
update();
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment