only_my_techna

Позволяет избегать ошибок при установке технологий

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği indirebilmeniz için ayrıca Tampermonkey gibi bir eklenti kurmanız gerekmektedir.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

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.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @description    Позволяет избегать ошибок при установке технологий
// @name           only_my_techna
// @namespace      virtonomica
// @include        http://virtonomic*.*/*/main/unit/view/*/technology
// @version 0.0.1.20150306122224
// ==/UserScript==
var win = (typeof(unsafeWindow) != 'undefined' ? unsafeWindow : top.window);
$=win.$;
//убрать лишние checkbox
$('table.list>tbody>tr:gt(1):not(.disabled)').each(function(){
if($('td:eq(1) a',this).prop('textContent').split(/\s*/)[2]!="0"){$('td:first div:first',this).empty()};})
//если установленная техна выше или равна максимально известной нам техне - убрать кнопку покупки, иначе выбрать самую высокую из наших
Number($('tr.disabled div').prop('textContent').replace(/[^\d\.]/g,''))>Number($('table.list>tbody input:last').attr('value'))?$('input.button160:last').css('display','none'):$('table.list>tbody input:last').click();
$('table.list>tbody input').change(function(){$('input.button160:last').css('display','table-row')});