FMU Skill Color

Skill color change

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name       FMU Skill Color
// @namespace  https://greasyfork.org/users/63572
// @version    1.0.0
// @description  Skill color change
// @match      *://ultra.trophymanager.com/players*
// @author     Jozi B.
// @copyright  2016 - JB
// @require http://code.jquery.com/jquery-latest.min.js
// @run-at      document-start
// ==/UserScript==

$(document).ready(function(){
        $('.skill_table td').each(function(){
            if($(this).text() <1) {
                $(this).css('background-color','transparent');
            }
            else if($(this).text() >= 1 && $(this).text() <30) {
                $(this).css('background-color','#A52728');
            }
            else if($(this).text() >= 30 && $(this).text() <50) {
                $(this).css('background-color','#D0510F');
            }
            else if($(this).text() >= 50 && $(this).text() <75) {
                $(this).css('background-color','#1B6C89');
            }
            else if($(this).text() >= 75 && $(this).text() <90) {
                $(this).css('background-color','#357A21');
            }
            else if($(this).text() >= 90 && $(this).text() <101) {
                $(this).css('background-color','#234f2b');
            }
            else if($(this).text() >=101) {
                $(this).css({'background-color':'#364139','color':'#faec74'});
            }
        });
    });