dofd1d2

Uzupelnia pola z cc i tankami

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        dofd1d2
// @description Uzupelnia pola z cc i tankami
// @namespace   soowal
// @include     http://*erepublik.com/*/economy/donate-money/*?*
// @include     http://*erepublik.com/*/economy/donate-items/*?*
// @require		https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js
// @require http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js
// @version     1
// @grant       GM_getValue
// @grant       GM_setValue
// @grant       GM_listValues
// @grant       GM_xmlhttpRequest
// @grant       GM_info
// @grant       unsafeWindow
// ==/UserScript==


function doscript()
{
    var el = Math.round(unsafeWindow.window.location.search.substr(1) * 100) / 100;
    if(!isNaN(el) && el > 0)
    {
        $('#donate_money_0').val(el+'');
        
        if(unsafeWindow.window.location.toString().indexOf('donate-items') > -1)
        {
            var obj = $('input[quality="7"][industry="2"]');
            if(obj.length)
            {
                $(obj).parent().prev().find('input').val(el+'');
            }
        }
    }
}

$(function()
{
    doscript();
});