Skip to content

Instantly share code, notes, and snippets.

@DKunin
Last active October 11, 2016 06:04
Show Gist options
  • Save DKunin/b309bd954eb4e7cf037234f11c3417f0 to your computer and use it in GitHub Desktop.
Save DKunin/b309bd954eb4e7cf037234f11c3417f0 to your computer and use it in GitHub Desktop.
UserScripts
// ==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