Greasy Fork is available in English.

Kinozal.tv/me/guru | Torrent/Magnet кнопки в поисковой системе/раздачи персоны.

Добавляет кнопку "Скачать раздачу" и "Скачать через Magnet" в "Поисковой системе" и "Раздачи персоны" для быстрого скачивания. / [Скачать через Magnet - Актуально тем, кто недавно зарегистрирован и кто хочет скачать без учёта рейтинга/скачивания.] (Фото внутри)

// ==UserScript==
// @name Kinozal.tv/me/guru | Torrent/Magnet кнопки в поисковой системе/раздачи персоны.
// @name:en Kinozal.tv/me/guru | Torrent + Magnet buttons in search page/person page.
// @description Добавляет кнопку "Скачать раздачу" и "Скачать через Magnet" в "Поисковой системе" и "Раздачи персоны" для быстрого скачивания. / [Скачать через Magnet - Актуально тем, кто недавно зарегистрирован и кто хочет скачать без учёта рейтинга/скачивания.] (Фото внутри)
// @description:en Adds a download button Torrent and Magnet in search page/person page. (Photo inside) / [Download with Magnet - Actually those who are newly registered and who want to download without taking into account the rating/download]
// @namespace none
// @version 0.3.6
// @author https://greasyfork.org/scripts/40843
// @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAQCAMAAAD+iNU2AAAAD1BMVEU7R4CAAAD4+/z9787///8A0Su5AAAASUlEQVR4AXWPAQrEMBACzen/33wdkGILFZQdSFxWkZKoyWBsd5JXvFgMfC6ZLBs0pq8Mtq8f0Bcbw9N3HvuI8i14sAt/e8/73j/4FwHuDyR5AQAAAABJRU5ErkJggg==

// == Search page ==
// @match *://kinozal.tv/browse.php*
// @match *://kinozal.me/browse.php*
// @match *://kinozal.guru/browse.php*

// == Person page ==
// @match *://kinozal.tv/persons.php*
// @match *://kinozal.me/persons.php*
// @match *://kinozal.guru/persons.php*
// ==/UserScript==

$(function() {
	// Download magnet button
	var css = '.btnDownloadMagnet {display:inline-block;width: 32px;height:32px;background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAHGklEQVR42q1Xa2xURRj9KqKQGKKCEaW+CGgMlBbYvrbbfW+72320Q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t3UcKHCUkobisOHbuh9lAaktmLh0cP54OMXbmGjiumNR45IIDXFpuaEET2lxQriMcAJfnGedU4EzzbNrbnhw19ORjTxHAbawATMCAslq7svR0YOIE2q/TUdvI0XTi8ZGkiR8KDnBpuaEFTWiTbHUaeMl3cwc+lVX8LlmKjvANN3lfmo72j52oAO0Ii0pYAY2BgxPG015dJu1Jz6IDiNXEgwNc4FT5ZdaCJrT/A3cBLIwJAKDnAAAAAElFTkSuQmCC);background-size: 32px 32px;}',
		head = document.head || document.getElementsByTagName('head')[0],
		style = document.createElement('style');
	style.type = 'text/css';
	if (style.styleSheet) {
		style.styleSheet.cssText = css;
	} else {
		style.appendChild(document.createTextNode(css));
	}
	head.appendChild(style);
	var table = $('.t_peer');
	var h = table.find('.mn');
	h.prepend('<td class="z"></td>');
	table.find('tr').not(h).each(function(i, e) {
		var td = document.createElement('td');
		$(e).prepend(td);
		var url = $(e).find('.nam a').attr('href');
		var uArgs = url.split('?')[1].split('&');
		// Find torrent id.
		var id = null;
		uArgs.forEach(function(el) {
			if (el.startsWith('id=')) {
				id = el.split('=')[1];
			}
		});
		if (id !== null) {
			var a = document.createElement('a');
			a.className = 'btnDownloadMagnet';
			$.get('/get_srv_details.php?id=' + id + '&action=2', function(s) {
				var result = new RegExp('Инфо хеш: (.\{40\})').exec(s);
				var hash = result[1];
				a.title = "Скачать через Magnet";
				a.href = 'magnet:?xt=urn:btih:' + hash;
			});
			td.appendChild(a);
		}
	});
	// Download torrent button
	var css = '.btnDownloadTorrent {display:inline-block;height:32px;width:32px;background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAByFBMVEWxQEqyQEqzQEqyQEqzQEqzQEqxQEqzQEqxQEqxQEqzQEqzQEqxQEqzQEqzQEqzQEqxQEqzQEqxQEqxQEqxQEqxQEqxQEqxQEqxQEqxQEqxQEqxQEqyQEqxQEqxQEqxQEqzQEqxQEqyQEqxQEqxQEqzQEqzQEqzQEqxQE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ncB++1/D/wmLWBaUSGS6B0bb+cldvv9XgJB9F00g45W+yLGuu6QzNaraDtk7dNRvX7w4vpB4eZiSK8fpic5gNomo9VqMaytKqwZLFbrenMWfgLz5ebyGVZSBwAAAABJRU5ErkJggg==);background-size: 32px 32px;}',
		head = document.head || document.getElementsByTagName('head')[0],
		style = document.createElement('style');
	style.type = 'text/css';
	if (style.styleSheet) {
		style.styleSheet.cssText = css;
	} else {
		style.appendChild(document.createTextNode(css));
	}
	head.appendChild(style);
	var table = $('.t_peer');
	var h = table.find('.mn');
	h.prepend('<td class="z"></td>');
	table.find('tr').not(h).each(function(i, e) {
		var td = document.createElement('td');
		$(e).prepend(td);
		var url = $(e).find('.nam a').attr('href');
		var uArgs = url.split('?')[1].split('&');
		// Find torrent id.
		var id = null;
		uArgs.forEach(function(el) {
			if (el.startsWith('id=')) {
				id = el.split('=')[1];
			}
		});
		if (id !== null) {
			// Create button
			var a = document.createElement('a');
			a.className = 'btnDownloadTorrent';
			a.title = "Скачать торрент";
			a.href = '/download.php?id=' + id;
			td.appendChild(a);
		}
	});
});