damiancd / ACLeague tracker helper

// ==UserScript==
// @name         ACLeague tracker helper
// @namespace    http://tampermonkey.net/
// @version      0.1
// @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 toPro = 21;
    var toSemiPro = 22;

    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 !!");
       }
    }
});

})();