Created
November 15, 2012 12:19
-
-
Save meadhikari/4078377 to your computer and use it in GitHub Desktop.
Get Torrent link on all Pirate bay Pages.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Get Torrent link on all piratebay link | |
// @description Sets a torcache link to all torrent files from torcache | |
// @namespace http://googlesystem.blogspot.com | |
// @include http://thepiratebay.se/torrent/* | |
// @include https://thepiratebay.se/torrent/* | |
// @match http://thepiratebay.se/torrent/* | |
// @match https://thepiratebay.se/torrent/* | |
// @author Bikram | |
// @version 1.4.10 | |
// @date 2012-11-15 | |
// @license MIT License | |
// ==/UserScript== | |
(function () { | |
var aTag = document.createElement('a'); | |
aTag.setAttribute('href',"http://torcache.net/torrent/"+/magnet:\?xt=urn:btih:([a-zA-z0-9]+)/g.exec(document.getElementsByClassName("download")[0].children.item().getAttribute('href'))[1].toUpperCase()+".torrent"); | |
aTag.setAttribute('title',"Right Click and Save") | |
aTag.innerHTML = "GET TORRENT FILE"; | |
document.getElementsByClassName("download")[0].appendChild(aTag) | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment