Little myepisodes.com userscript (modified for Firefox)
2013-06-01
I have updated my myepisodes userscript to work with Firefox (link), which is apparently significantly different. It would be nice if at least all browsers had the same javascript standards... oh well.
To install, you need the Greasemonkey extension and then you can add this to it!
// ==UserScript==
// @name myeps
// @include http://www.myepisodes.com/*
// @version 1
// @grant none
// ==/UserScript==
function myfunc()
{
// get table by class name as array
arr = document.getElementsByClassName('showname')
// loop over array
for (var i = 0; i < arr.length; i++) {
// get show name
name = arr.item(i).textContent;
// add torrentz.net search
str = "http://torrentz.eu/search?f=" + name.replace(/ /g,"+")
// generate link
link = "<a href="+str+">"+name+"</a>"
// generate 720p link
link_720p = "<a href="+str+" +720p"+">"+"(720p)"+"</a>"
// update cell
arr.item(i).innerHTML = arr.item(i).innerHTML + " " + link_720p;
}
}
// run after page has loaded
window.onload = myfunc;
Original post on web.archive.org.