// ==UserScript== // @name Torrentz : The Bobcat add-on // @namespace http://torrentzBobCat // @homepage http://www.youtube.com/watch?v=1QyuIDw0CIw&feature=youtu.be // @description Add IMDB ratings, download links, movie plot/actors, and other goodies. Also features an awesome built-in serie tracker. Upgrade your experience of torrentz to a whole new level! Watch this video for a quick demo : http://www.youtube.com/watch?v=1QyuIDw0CIw&feature=youtu.be // @author coolMatt // @version 1.3.4 // @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 /*New in 1.2 : Movie Ratings are now hyperlinks to IMDB as suggested by NK3*/ var Torrentz = {}; Torrentz.GM = {}; Torrentz.GM.BobCatTorrentz = {}; Torrentz.GM.BobCatTorrentz = { PageCache_movieInfo: {}, PageCache_lk_id_info: {}, start: function () { initCss(); this.addPluginZone(); $("div.cloud").hide(); var loginStore = Enbalaba.GetLocalStore("moviesInfo"), loginData = loginStore.get(); var cacheSize, k, that = this; try { cacheSize = Object.keys(loginData).length } catch (err) { cacheSize = 0; for (k in loginData) { if (loginData.hasOwnProperty(k)) { cacheSize++ } } } console.info("Cache size:" + Object.keys(loginData).length); if (cacheSize > 150) { that.clearCache() } var 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")) }); results.find("dt").click(function () { var dt = $(this), text, divDesc = dt.find(".movieDesc"), div, lk, aElement; if (divDesc.length == 0) { aElement = dt.children("a:first"); if (aElement.length == 0) { return } var id = aElement.attr("href").substr(1).toUpperCase(), info = null; if (!id) { return } if (that.PageCache_lk_id_info[id]) { info = that.PageCache_movieInfo[that.PageCache_lk_id_info[id]] } if (info) { text = "