Gigrawars Mehr Infos

Zeigt den Namen neben den Koordinaten

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name         Gigrawars Mehr Infos
// @namespace    http://board.gigrawars.de
// @version      1.1
// @description  Zeigt den Namen neben den Koordinaten
// @author       Magnum Mandel ([email protected])
// @match        http://uni2.gigrawars.de/*
// @grant        none
// ==/UserScript==

    $(document).ready(function () {

    $(".itemOwnFleet > td:contains('Spionage')").each(function(index) {
        $(this).css( "color", "orange" );
    });

    $(".itemOwnFleet > td:contains('Stationierung')").each(function(index) {
        $(this).css( "color", "deepskyblue" );
    });


    $("a[href*=\"/game_player_index\"]").each(function(index) {
        var orig = $(this).attr("original-title");
        if (typeof orig != 'undefined') {
            $(this).append(" (" + orig + ")");
        }
    });

    $(".itemOwnFleet > td > span, .itemComebackFleet > td > span").each(function(index) {
        var orig = $(this).attr("original-title");
        var text = $(this).text();
        if (typeof orig != 'undefined') {
            if (orig.indexOf("Rohstoffe")>-1 && text.indexOf("Stationierung")==-1 && text.indexOf("Transport")==-1) {
                orig = orig.replace('<b>Schiffe</b><br />','<b>').replace('<b>Rohstoffe</b><br />','</b>');
                var pos = orig.indexOf("Eisen") + 5;
                var fe = orig.substring(pos);
                pos = fe.indexOf("<br");
                fe = fe.substring(0,pos);
                fe = fe.replace(".","");
                if(parseInt(fe)>3000) {
                    $(this).css( "color", "yellowgreen" );
                }
            } else {
                orig = orig.replace('<b>Schiffe</b><br />','');
            }

            $(this).html(orig);
        }
    });


});