Greasy Fork

Greasy Fork is available in English.

KAT - Limit Reputation Width

Makes it so that column goes onto new line for long names

当前为 2014-10-04 提交的版本,查看 最新版本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name        KAT - Limit Reputation Width
// @namespace   LimitReputationWidth
// @version     1.00
// @description Makes it so that column goes onto new line for long names
// @require		http://code.jquery.com/jquery-latest.js
// @match     http://kickass.to/user/*/reputation*
// @match     https://kickass.to/user/*/reputation*
// ==/UserScript==

$("td.left").css("max-width", "630px");
$("td.left").css("word-wrap", "break-word");

/** Wrap mode on (true) / off (false) - on by default
 * 
 *  If on, the torrent name will continue on the next line - works in most cases
 *  If off, only the first 630 pixels of the column/title is visible, anything extra is simply hidden
 */

var wrap = true;

if (wrap == true)
{
	$(".widgetButton").each(function()
   	{
        if ($(this).width() > $(this).parent().width() - 60)
        {
            $(this).css("max-width", "550px");
            $(this).css("word-wrap", "break-word");
            $(this).css("margin-bottom", "3px");
            $(this).addClass("wrap");
            $(this).addClass("block");
        }
    });
}
$(".nowrap").removeClass("nowrap");