wmosakowskicraft / Bamboo Deployment Status

// ==UserScript==
// @name         Bamboo Deployment Status
// @namespace    http://tampermonkey.net/
// @version      1.13
// @description  This script is written to allow easy checking deployment status
// @updateURL https://openuserjs.org/meta/wmosakowskicraft/Bamboo_Deployment_Status.meta.js
// @author       Wieslaw Mosakowski
// @match        https://jira.atlassian.com/browse/*
// @match        http://jira.intranet.roche.com/jira/browse/*
// @match        http://jira.intranet.roche.com/jira/projects/MEDINF/issues/*
// ==/UserScript==

setInterval(function() {
    var myImageElement = document.getElementById('myImage');
    console.log('updated');
    myImageElement.src = 'http://bamboo.intranet.roche.com/bamboo/plugins/servlet/wittified/build-status/MIATLAS-MASTERDEVINTDEPLOYSOURCESSVNTOSANDBOX?rand=' + Math.random();
}, 5000);

$(document).ajaxComplete(function() {

    if(!$('#myImage').next().length) {

        $('#myImage').remove();
        $('.toolbar-split-left').append("<img src='http://bamboo.intranet.roche.com/bamboo/plugins/servlet/wittified/build-status/MIATLAS-MASTERDEVINTDEPLOYSOURCESSVNTOSANDBOX' id='myImage' />");

    }

});

(function() {
    'use strict';



})();