Skip to main content
  1. Posts/

Little myepisodes.com userscript (modified for Firefox)

·184 words·1 min

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!

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// ==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.