// ==UserScript== // @name TM Squad with Training Enhanced - Credit to TM Auxiliary // @version 1.0.1 // @description Show player list with ASI and enhance training display // @namespace http://trophymanager.com // @include http://trophymanager.com/players // @include http://trophymanager.com/players/ // @include http://trophymanager.com/players/#* // @include http://*.trophymanager.com/players // @include http://*.trophymanager.com/players/ // @include http://*.trophymanager.com/players/#* // @downloadURL https://update.greasyfork.icu/scripts/6877/TM%20Squad%20with%20Training%20Enhanced%20-%20Credit%20to%20TM%20Auxiliary.user.js // @updateURL https://update.greasyfork.icu/scripts/6877/TM%20Squad%20with%20Training%20Enhanced%20-%20Credit%20to%20TM%20Auxiliary.meta.js // ==/UserScript== function embed() { var oldFunc = makeTable; makeTable = function() { if (!show_training) { ths = ["no","name","age","fp","str","sta","pac","mar","tac","wor","pos","pas","cro","tec","hea","fin","lon","set","asi","rec","bteam"]; gk_ths = ["no","name","age","fp","str","sta","pac","han","one","ref","ari","jum","com","kic","thr",,,,"asi","rec","bteam"]; myTable = document.createElement('table'); myTable.className = "hover zebra"; construct_th(); var z=0; for (i=0; i age_max)) { construct_tr(players_ar[i], z, true); z++; } } } } $e("sq").innerHTML = ""; $e("sq").appendChild(myTable); activate_player_links($(myTable).find("[player_link]")); init_tooltip_by_elems($(myTable).find("[tooltip]")); zebra(); $('table.zebra th:nth-child(19)').css('width', '65px'); $('.rec').width(75); } else { oldFunc(); // Black/gray alternating table background $('table.zebra tr').css('background-color', '#222222'); $('table.zebra tr.odd').css('background-color', 'rgb(48, 48, 48)'); // Small training increases $('span.training_small').css('border', '1px rgb(141, 182, 82) solid'); $('span.training_small').css('background-color', '#45521E'); // Small training decreases $('span.training_part_down').css('border', '1px #D7220E solid'); $('span.training_part_down').css('background-color', '#502927'); // Big training increases $('span.training_big').css('font-size', '13px'); $('span.training_big').css('font-weight', 'normal'); $('span.training_big').css('background-color', '#93B751'); $('span.training_big').css('color', '#000000'); // Big training decreases $('span.training_down').css('font-size', '13px'); $('span.training_down').css('font-weight', 'normal'); $('span.training_down').css('background-color', '#D7220E'); $('span.training_down').css('color', '#000000'); // Increase all skill space sizes $('span.training_big, span.training_small, span.training_part_down, span.training_down, span.subtle').css('width', '15px'); // No changes $('span.subtle').css('color', '#FFFFFF'); // Remove position background $('table.zebra tr .favposition').css('background-color', '#222222'); $('table.zebra tr.odd .favposition').css('background-color', 'rgb(48, 48, 48)'); // Add borders to sides of tables $('table.zebra').css('border-left', '3px #222222 solid'); $('table.zebra').css('border-right', '3px #222222 solid'); // Intensity & +/- alignment $('table.zebra tr td:nth-child(19)').css('padding-right', '12px'); $('table.zebra tr th:nth-child(20)').css('width', '34px'); /* // Intensity & +/- alignment $('table.zebra tr td:nth-child(18)').css('padding-right', '12px'); $('table.zebra tr th:nth-child(19)').css('width', '34px'); $('table.zebra tr td:nth-child(19) span').css('width', '32px'); // Intensity & +/- alignment for goalie coach $('table.zebra:eq(5) tr td:nth-child(15)').css('padding-right', '12px'); $('table.zebra:eq(5) tr th:nth-child(15)').css('width', '34px'); $('table.zebra:eq(5) tr td:nth-child(16) span').css('width', '32px'); // Coach headers $('h3').css('background-color', '#222222'); // Show the stars! $('span:contains("19")').html(''); $('span:contains("20")').html(''); // Remove text fade $('.text_fade div').css('background-image', ''); */ } $('.name').width(230); }; makeTable(); } var inject = document.createElement("script"); inject.setAttribute("type", "text/javascript"); inject.appendChild(document.createTextNode("(" + embed + ")()")); document.body.appendChild(inject);