Greasy Fork is available in English.
获取真实的种子内容大小, 在不新开窗口的情况下. Get real size of the torrents with out page jumps. torrentkitty | torrent kitty
当前为
// ==UserScript==
// @name Torrent Kitty 种子内容大小获取 | Torrentkitty Content Size Get
// @namespace https://boblee.cn
// @version 0.4
// @description 获取真实的种子内容大小, 在不新开窗口的情况下. Get real size of the torrents with out page jumps. torrentkitty | torrent kitty
// @author Bob Lee
// @match *://www.torrentkitty.tv/search/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
var urlList = new Array();
var table = $("table#archiveResult").children().children();
window.getSize = function (id, url) {
$.ajax({
url: "https://www.torrentkitty.tv" + url,
type: "GET",
beforeSend: function () {
var target = document.getElementById(id);
target.innerText = "loading...";
},
success: function(res){
var target = document.getElementById(id);
target.innerText = ($(res).filter('div#main').children().filter('div.wrapper').children().filter('table.detailSummary').children().children().children()[7].innerText);
}
})
}
window.getSizeAll = function () {
for (var i = 1; i < table.length; i++) {
window.getSize("bob_" + i, urlList[i]);
}
}
table[0].cells[1].innerHTML = '<th class="size"><a onclick=\'window.getSizeAll()\'>Content Size</a></th>';
for (var i = 1; i < table.length; i++) {
var tmpUrl = table[i].cells[3].innerHTML.split('"')[1];
urlList[i] = tmpUrl;
table[i].cells[1].innerHTML = "<a id='bob_" + i + "' onclick='window.getSize(\"" + "bob_" + i + '","' + tmpUrl + "\")'>Get</a>";
}
})();