// ==UserScript== // @name Torrentz.eu: magnet and direct links // @description Automatically adds direct .torrent and magnet links on Torrentz.eu — So easy your mom could use it. Tested in Firefox and Chrome. // @author bfredit // @include *://torrentz.* // @include *://tz.ai // @include *://torrentz*.* // @match *://torrentz.com/* // @match *://torrentz.eu/* // @match *://torrentz.ph/* // @match *://torrentz.me/* // @match *://torrentz.in/* // @match *://torrentz.hk/* // @match *://torrentz.de/* // @match *://tz.ai/* // @icon http://i.imgur.com/XN2jS.png // @screenshot http://i.imgur.com/gYIlR.png // @screenshot http://cl.ly/6kwz/b.png // @version 10000 // /*@run-at document-start*/ // // @license GPL version 3 or any later version; http://www.gnu.org/copyleft/gpl.html // @namespace https://greasyfork.org/users/2824 // ==/UserScript== // // internal name: Quick Torrentz // formerly: Torrentz.eu for Your Mom function bfr_t_activate() { var $ = jQuery, css = [ ".qt_links a{display: inline-block; width:10px ; height: 18px; margin-right: 4px; text-align: center; -webkit-border-radius: .3em; -moz-border-radius: 3px; border-radius: 3px; line-height:1em; text-decoration:none !important; vertical-align:top; }", ".qt_links a:nth-child(-n+2){width:18px !important;background-image: url(http://i.imgur.com/1yfjx.png); background-repeat: no-repeat; background-position: 2px top}", ".qt_links a:nth-child(3){right: -12px;}", ".qt_links a:nth-child(4){right: -24px;}", ".qt_cache:nth-child(n+3),.dnotblockmebro{position: absolute; display: none; }", "dl:hover .qt_cache{display: inline-block}", ".qt_magnet{background-color: #FFB090; }", ".qt_cache{background-color: #336699; } ", ".qt_links a:hover{background-color: #FF5511;}", ".qt_separator{color:transparent !important; cursor:default !important;}", "div.results > dl > dt {width: 648px !important; } ", "div.results > dl > dd{width: 350px !important;} ", "div.results > dl:hover > dd > span.v {position:relative;left: -70px; background: white;}", //"div.results > dl:hover > dd > span.v:before {content: attr(title); }", ".qt_links{float: left; width: 70px; position:relative; top: -3px; opacity: .7; }", "dl:hover .qt_links{opacity:1}", ".u {background-repeat: no-repeat; background-position: 5px center}", "span.Magnet {background-image: url('http://upload.wikimedia.org/wikipedia/commons/c/c2/Magnet-icon.gif')}", "span.Torrage {background-image: url('https://torrage.info/favicon.png')}", "span.Torcache {background-image: url('https://torcache.net/favicon.ico')}", "span.btcache {background-image: url('http://www.btcache.me/app/btcache/View/images/favicon.ico')}" ]; css = css.join("\n"); if (typeof GM_addStyle != "undefined") { GM_addStyle(css); } else if (typeof PRO_addStyle != "undefined") { PRO_addStyle(css); } else if (typeof addStyle != "undefined") { addStyle(css); } else { var heads = document.getElementsByTagName("head"); if (heads.length > 0) { var node = document.createElement("style"); node.type = "text/css"; node.appendChild(document.createTextNode(css)); heads[0].appendChild(node); } } $(function (){ function getHosts(hex) { return { 'Torrage':'https://torrage.info/torrent/'+hex+'.torrent', 'btcache':'http://btcache.me/torrent/'+hex+'.torrent', 'Torcache':'https://torcache.net/torrent/'+hex+'.torrent', } } $('.results h2, .download dd').filter(':contains(S'+'p'+'on'+'so'+'red)').parents('dl,.results').remove(); $('.download h2').each(function(){//needed to avoid html-to-dom on unnecessary pages var $this = $(this), name = $this.children('span').text(), hex = document.location.pathname.substring(1).toUpperCase(), linksString = ['