// ==UserScript== // @name Torrentz : The Bobcat add-on // @namespace http://torrentzBobCat // @homepage http://www.youtube.com/watch?v=1QyuIDw0CIw&feature=youtu.be // @description Torrentz.eu: Add IMDB ratings, download links, movie plot/actors, and other goodies. Also features an light built-in serie tracker. Torrentz gets so much simpler and efficient! Demo video here: http://www.youtube.com/watch?v=1QyuIDw0CIw&feature=youtu.be // @author CoolMatt // @version 1.3.8 // @grant none // @include *://torrentz.* // @match *://torrentz.com/* // @match *://torrentz.eu/* // @downloadURL none // ==/UserScript== // @date 19 Jun 2013 // @license GPL version 3 or any later version; http://www.gnu.org/copyleft/gpl.html //Define the namespace var Torrentz = Torrentz || {}; Torrentz.GM = {}; Torrentz.GM.BobCatTorrentz = {}; Torrentz.GM.BobCatTorrentz = { PageCache_movieInfo: {}, //Store info about movies of the page PageCache_lk_id_info: {}, //Lookup table - as several torrentz can point at the same movie info start: function () { initCss(); this.addBadgeAndButtons(); $("div.cloud").hide(); var loginStore = Enbalaba.GetLocalStore("moviesInfo"), loginData = loginStore.get(), that = this, results; //Calculate cache size and clear it if too big this.checkCacheSize(loginStore); //Get rid of this incredibly annoying & ridiculous advertising banner $("body>iframe:first").hide(); //Start processing of the rows results = $(".results"); results.find("h3:first").append("| Rating"); results.children("dl").each(function (index) { that.processRow($(this), loginData, false); }); results.find("span.downloadLink").click(function () { $(this).replaceWith("
"); downloadTorrent($(this).attr("data-torrentid")); }); //Add events for when the row is clicked results.find("dt").click(function () { var dt = $(this), text, divDesc = dt.find(".movieDesc"), div, lk, aElement; if (divDesc.length == 0) { //First time the user clicks here aElement = dt.children("a:first"); if (aElement.length == 0) return; var id = aElement.attr("href").substr(1).toUpperCase(), info = null; if (!id) return; //Retrieve info from cache if (that.PageCache_lk_id_info[id]) { info = that.PageCache_movieInfo[that.PageCache_lk_id_info[id]]; } if (info) { // text = "