NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @name Download All Torrents or Magnets // @namespace PXgamer // @version 0.1 // @description Adds buttons to download all torrents or magnets on a page. // @author PXgamer // @include *kat.cr/* // @grant none // ==/UserScript== (function() { 'use strict'; var url = ""; $('#mainSearchTable').before('<button class="siteButton bigButton downloadAll" data-dl-type="torrent">Download All With Torrent</button> <button class="siteButton bigButton downloadAll" data-dl-type="magnet">Download All With Magnet</button>'); $('.downloadAll').click(function () { switch ($(this).attr('data-dl-type')) { case 'magnet': $('a.icon16.askFeedbackjs[data-nop][href^="magnet:?xt="]').each(function () { url = $(this).attr('href'); open(url); }); break; case 'torrent': $('a.icon16.askFeedbackjs[data-download][href^="/torrents/"]').each(function () { url = $(this).attr('href'); open(url); }); break; default: console.info('No Method Selected'); } }); })();