damiancd / ACLeague GTE tracker helper

// ==UserScript==
// @name         ACLeague GTE tracker helper
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  ACLeague GTE timetable extender
// @author       damiancd
// @include        http://managerdc7.rackservice.org:50175/*
// @exclude      http://managerdc7.rackservice.org:50915/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
$(document).ready(function() {
    //LAMBO OP TORY CHUJOWE
    // NO I CO TU ZAGLÄ„DASZ CWELASIE XD
    var page = $('body > div > div.page-header > div:nth-child(3) > div > form > div > div:nth-child(2) > a').html();
    var isOnCorrectPage = (page == 'Show selected') ? true : false;
    if (isOnCorrectPage) {
        var toPro = 21;
        var toSemiPro = 26;

        var counterPro = 1;
        var counterSemiPro = 1;

        for(var i=0; i<120; i++) {
            var validLaps = $('body > div > div.row > div > table > tbody > tr:nth-child(' + i + ') > td:nth-child(13)').html();
            if(validLaps >= 15) {
                if(counterPro < toPro) {
                    $('body > div > div.row > div > table > tbody > tr:nth-child(' + i + ') > td:nth-child(5)').css('background-color', '#f78f8f').append("<strong><br><style='font-size: 12px;'>" + counterPro + ". PRO</strong></style>");
                    counterPro++;
                } else if(counterSemiPro < toSemiPro) {
                    $('body > div > div.row > div > table > tbody > tr:nth-child(' + i + ') > td:nth-child(5)').css('background-color', '#f7cf8f').append("<strong><br><style='font-size: 12px;'>" + counterSemiPro + ". sPRO</strong></style>");
                    counterSemiPro++;
                }
            } else {
                $('body > div > div.row > div > table > tbody > tr:nth-child(' + i + ') > td:nth-child(5)').css('background-color', '#9ba5ff').append("<br>!! LAPS < 15 !!");
            }
        }
    }
});

})();