Youtrack_check_changelog

try to take over the world!

// ==UserScript==
// @name         Youtrack_check_changelog
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       [email protected]
// @match        http://youtrack.ispsystem.net:8080/issue/*
// @grant        none
// ==/UserScript==

window.onload = function(){
var i, j=0;
var comment_text = document.getElementsByClassName('comment-content');
var len = comment_text.length;

//alert(document.getElementById('resolution').value);

if (len > 0) {
    for (i = 0; i <= len; i++){
        if ( -1 < comment_text[i].innerHTML.indexOf("#CL#") ) {
            j += 1;
        }
        //alert ( i + "  " + len + "  " + j );

        if ( (i == len-1) && ( j === 0) ){
            alert ('\n\n                     ATTENTION! Changelog was not found! \n\n');
        }
    }
} else {
    alert ('\n\n                     ATTENTION! Changelog was not found! \n\n');
}
}();