Last active
October 11, 2016 06:04
-
-
Save DKunin/b309bd954eb4e7cf037234f11c3417f0 to your computer and use it in GitHub Desktop.
UserScripts
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 Add link to piratebay torrents | |
// @namespace http://tampermonkey.net/ | |
// @version 0.3 | |
// @description Click on the show's name, sends to piratebay with title and episode number | |
// @author DKunin | |
// @match http://www.tvshowtime.com/en | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
Array.from(document.querySelectorAll('.episode-details')).forEach(singleItem => { | |
var link = singleItem.querySelector('.nb-reviews-link'); | |
var episode = singleItem.querySelector('h2 > a').innerText; | |
link.href = `https://thepiratebay.org/search/${link.innerText} ${episode}`; | |
link.target = '_blank'; | |
console.log('inited links') | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment