您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
Automatically sorts translators alphabetically (by language)
当前为
// ==UserScript== // @name KAT - Sort Translators // @namespace SortTranslators // @version 1.01 // @description Automatically sorts translators alphabetically (by language) // @require http://code.jquery.com/jquery-latest.js // @match http://kickass.to/people/translators/ // @match https://kickass.to/people/translators/ // ==/UserScript== var info = []; $('.firstColl:first > ul > li').each(function() { var all = $(this).html(); var span = $(this).children("span"); $(span).remove(); var language = $(this).html(); info.push({"html":all, "lang":language}); $(this).remove(); }); var columnLimit = info.length; var current = 0; $('.secondColl:first > ul > li').each(function() { var all = $(this).html(); var span = $(this).children("span"); $(span).remove(); var language = $(this).html(); info.push({"html":all, "lang":language}); $(this).remove(); }); info.sort(function(a, b) { return a.lang.localeCompare(b.lang);; }); for (i = 0; i < info.length; i++) { if (current < columnLimit) { $('.firstColl:first > ul').append('<li>' + info[i].html + '</li>'); } else { $('.secondColl:first > ul').append('<li>' + info[i].html + '</li>'); } current++; } info = []; $('.thirdColl:first > ul > li').each(function() { var all = $(this).html(); var span = $(this).children("span"); $(span).remove(); var language = $(this).html(); info.push({"html":all, "lang":language}); $(this).remove(); }); info.sort(function(a, b) { return a.lang.localeCompare(b.lang);; }); for (i = 0; i < info.length; i++) { $('.thirdColl:first > ul').append('<li>' + info[i].html + '</li>'); }