TM - FM skills color scheme

Football Manager 2007 colors

目前為 2024-11-06 提交的版本,檢視 最新版本

// ==UserScript==
// @name         TM - FM skills color scheme
// @version      1.0
// @license MIT
// @description  Football Manager 2007 colors
// @author       Haydar - FC Marcimenium
// @match        https://trophymanager.com/players/*
// @grant        none
// @namespace https://gf.qytechs.cn/users/1392085
// ==/UserScript==

// it works on single player page

setInterval(function(){
$('.skill_table img[src$="/pics/star_silver.png"]').replaceWith('19');
$('.skill_table img[src$="/pics/star.png"]').replaceWith('20');

$('.hover img[src$="/pics/star_silver.png"]').replaceWith('19');
$('.hover img[src$="/pics/star.png"]').replaceWith('20');

$("td.skill").attr("style", "unset");

(function() {
    'use strict';

    function find_color(br){
       switch(br){
           case 1:
           case 2:
           case 3:
           case 4:
           case 5:
               return "darkgrey"
               break;
           case 6:
               return "grey"
               break;
           case 7:
           case 8:
           case 9:
               return "lightgrey"
           case 10:
           case 11:
           case 12:
               return "#f7fca3"
               break;
           case 13:
           case 14:
           case 15:
               return "yellow"
               break;
           case 16:
           case 17:
           case 18:
               return "#fea12a"
           case 19:
           case 20:
               return "#ff7f24"
               break;
           default:
               return ""
       }
    }

    //Get the Table cells for the skills in both pages
    var td = $("td.align_center, td.skill > div")

    td.each(function() {
        var color = find_color(parseInt($(this).text())); // Parse the text content as an integer
        $(this).css("color", color).removeClass("subtle"); // Apply color style to the element and remove class
    });

})();
}, 500)

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址