T411 - gray torrents over 5go

gray torrents over 5go T411

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         T411 - gray torrents over 5go
// @name:fr      T411 - grise les torrents de plus de 5go
// @namespace    T411 - gray torrents over 5go
// @version      0.0.2
// @description  gray torrents over 5go T411
// @description:fr  grise les torrents de plus de 5go T411
// @author       rot
// @match        *://*.t411.ai/torrents/search/*
// @match        *://*.t411.ai/top/week*
// @match        *://*.t411.ai/top/today*
// @match        *://*.t411.ai/top/month*
// @grant        none
// @require      http://code.jquery.com/jquery-latest.js
// ==/UserScript==

$(document).ready(function() {
    $data = $('table.results tbody tr');

    $.each($data, function(index, val) {
        $currtd = $(val).find('td:nth-child(6)'); //colonne du poids
        $text = $currtd.text();
        $match = $text.match(/.+GB$/i);


		var number = parseFloat($text);


		//si trouve GB dans la cellule
        if ($match) {

            // defini couleurs selon la taille trouvee :

            // 5 GB a 10 GB
            if (number>5 && number<10){
				text_rgb = ' #777'; //gris foncé
			}
            // 10 GB et plus
            else if(number>=10){
				text_rgb = ' #bbb'; // gris clair
			}
            // defaut : 1 GB a 5 GB
            else{
				text_rgb = ' #000'; // noir d'origine
            }


            // pour couleur unique (griser si > 5 GB)
			// if (number>5) text_rgb = ' #888';

            //
            // applique le style
            $( "td,a", val).css({
                'color' : text_rgb
            }).removeClass('up down');

        }

    });
});