// ==UserScript== // @name TPB Torrent Downloads Fork // @version 0.4 // @description Piratebay download via torrents // @include *thepiratebay.se/* // @include *thepiratebay.org/* // @require https://code.jquery.com/jquery-latest.min.js // @namespace https://greasyfork.org/users/59385 // @downloadURL none // ==/UserScript== (function() { 'use strict'; var user_preferred_cache = 'cache_2'; var preferred_caches = { cache_1: { name: 'Torcache', url: 'https://torcache.net/torrent/', end: '.torrent' }, cache_2: { name: 'Torrage', url: 'http://torrage.info/torrent.php?h=', end: '' }, cache_3: { name: 'iTorrents', url: 'http://itorrents.org/torrent/', end: '.torrent' } }; $('a[title="Download this torrent using magnet"][href^="magnet:"]').each(function() { var hash = $(this).attr('href').split(":")[3]; hash = hash.split("&")[0]; $(this).after('Torrent link'); }); })();