Greasy Fork is available in English.
Created by PXgamer & Dr.YeTii
当前为
// ==UserScript==
// @name Anti-DMCA (Download DMCA'd Torrents from KAT)
// @namespace PXgamer
// @include *kickass.so/*
// @include *kickass.to/*
// @include *kat.ph/*
// @include *kat.cr/*
// @version 3.1
// @grant none
// @description Created by PXgamer & Dr.YeTii
// ==/UserScript==
if ($('.alertfield').length==1) {
var hash = $('#tab-technical .lightgrey').text().split(': ')[1];
var name = window.location.pathname.split('/')[1];
name = name.substring(0, name.lastIndexOf("-"));
var trackers = [];
$('#trackers_table tr').each(function() {
trackers.push({'url':$('td:eq(0)', $(this)).text(), 'seed':$('td:eq(3)', $(this)).text(), 'leech':$('td:eq(4)', $(this)).text()});
})
trackers.sort(function(a, b) {
var x = a['seed']; var y = b['seed'];
return ((x < y) ? -1 : ((x > y) ? 1 : 0));
});
for (var i=0;i<trackers.length;i++){
console.log(trackers[i].url + ' - ' + trackers[i].val);
}
var tracker = trackers[trackers.length-1].url;
var values = '<div class="seedLeachContainer" title="These are the last updated values, they are likely not up to date"><div class="seedBlock"><span class="seedLeachIcon"></span>seeders: <strong itemprop="seeders">'+trackers[trackers.length-1].seed+'</strong></div><div class="leechBlock"><span class="seedLeachIcon"></span>leechers: <strong itemprop="leechers">'+trackers[trackers.length-1].leech+'</strong></div></div>';
var style = '.alertfield {margin: 0px auto 5px;}'+
'.siteButton.verifTorrentButton {}'+
'.siteButton.verifTorrentButton .buttonPic {margin-right: 0px;}'+
'.siteButton.verifTorrentButton .buttonPicMagnet {linear-gradient(rgb(153, 135, 80), rgb(140, 122, 64)) repeat scroll 0% 0% transparent;padding-right: 1px;margin-right: 12px;}'+
'.siteButton.verifTorrentButton:hover .buttonPicMagnet{linear-gradient(#857540, #7E6B2E) repeat scroll 0% 0% transparent;}'+
'.siteButton.verifTorrentButton .buttonPicTorrent {margin-left: 3px;}'+
'.px {margin-left: 5px;}'+
'#123 { display : flex; align-items : center;}';
var verified = '';
if ($('.tabs.tabSwitcher').prev().text().indexOf('Torrent verified') >= 0) {
verified = '<em style="margin-right: 5px; padding: 5px 3px 3px 3px; bottom: 0; line-height: 10px; font-size: 20px;" class="ka ka16 ka-verify" title="Torrent is Verified"></em>';
}
var buttonGroup = '<div id="123" class="buttonsline downloadButtonGroup clearleft novertpad"><style>'+style+'</style>'+verified+'<a href="magnet:?xt=urn:btih:'+hash+'&dn='+name+'&tr='+tracker+'" rel="nofollow" title="Magnet link download"><em style="padding: 5px 3px 3px 3px; bottom: 0; line-height: 10px; font-size: 20px;" class="ka ka16 ka-magnet"></em></a>'+
'<a href="http://torcache.net/torrent/'+hash+'.torrent" class="siteButton giantButton askFeedbackjs px" rel="nofollow" title="Torcache download"><span>Torcache</span></a>'+
'<a href="http://thetorrent.org/'+hash+'.torrent" class="siteButton giantButton askFeedbackjs px" rel="nofollow" title="TheTorrent download"><span>TheTorrent</span></a>'+
'<a href="http://itorrents.org/torrent/'+hash+'.torrent" class="siteButton giantButton askFeedbackjs px" rel="nofollow" title="iTorrents download"><span>iTorrents</span></a>'+
'<a href="/community/show/95496/"><em style="margin-left: 5px; padding: 5px 3px 4px 3px; bottom: 0; line-height: 9px; font-size: 23px;" class="ka ka16" title="More information?"><span>?</span></em></a>'+
'</div>';
$('.alertfield').after(values+buttonGroup)
}