// ==UserScript==
// @name Torrentz : The Bobcat add-on (mod)
// @name:tr Torrentz : The Bobcat add-on (mod)
// @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 (movie poster added on the mod), and other goodies. Also features an light built-in serie tracker (remove tracker on the mod). Torrentz gets so much simpler and efficient! Demo video here: http://www.youtube.com/watch?v=1QyuIDw0CIw&feature=youtu.be
// @description:tr Torrentz.eu: Aramlarınız sonucunda karşınıza çıkan listedeki filmlere indirme bağlantısı, film hakkında poster (orijinal sürümde poster yoktur) ve çeşitli bilgiler ekler. Orijinal sürümünde dizi bölümlerini takip eden bir kod vardır ama bende bir türlü çalışmadığı için kaldırdım.
// @author CoolMatt (moder: aytecesmebasi)
// @version 1.3.9 (mod)
// @include *://torrentz*.*
// @match *://torrentz.com/*
// @match *://torrentz.eu/*
// @match *://torrentz.in/*
// @match *://torrentz.me/*
// @match *://torrentz.ch/*
// @match *://torrentz-proxy.com/*
// @grant GM_xmlhttpRequest
// @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAABNVBMVEUAAAAlSm8lSnAlS3AmS3AmTHImTHMmTXQnTnYnT3coTHEoUXkpUnsqVH4qVYArT3MrV4IsWYUtWoguXIovXo0vX44wYJAwYZIxVHcxYpQxY5UyZJYyZZcyZZgzZpk0Z5k1Z5k2aJo3WXs3aZo8bJ09Xn8+bp5CcaBFZYRHdaJJdqNNeaVPbYtQe6dSfahVf6lYdJFbhKxchK1hiK9iibBjfZhnjLJvh6Bylbhzlrh6m7x8kqh8nb2KnrGNqcWRrMeYqbuYssuas8ymtcSovdOqv9SvwtawxNezv8y2yNq5ytu+ydTD0eDJ0tvJ1uPP2ubT2uLZ4uvc4efe5u7f5+7i6fDl6e3p7vPq7fHq7/Ts8PXu8vbw8vTx9Pf19vj2+Pr4+fr4+fv6+/z8/Pz8/P39/f3///871JlNAAAAAXRSTlMAQObYZgAAAXFJREFUeNrt20dPw0AQBeBs6DX0niGhhN57Db333kJn//9PYOdgCQlYEEJ5Ab13mhnb8nfwYSRrQyGBxr3fQiMEEEAAAW8BkrZ8DJA0hgACCCCAAAIIIIAAAgjwAuy346cvBRdRgC0wIHYFBsxaLGAghQWMnlskoG/12f4c4H1CvIknuoYn59dPrAYBCO4igAAA4H0IIIAAAggggAACCPh3AG+MIQALWDalqI9w/NHNdguLoiBAf8qNzlryGgQD6Dh1k9verBrBAFr3dTJhKgUE2NTBgikTEGBR++3s4igIMK3tUV1+o2AAIw+uu+nMqRUMoOfaNU9j4SrBABLH2syZcsEA4ntab5gSAQHWtDyIFDSBAEmtLtpz6wUDmHpxxf1guFowgKE7LWZMhWAA3ZfBCoABtB3aYAWAAJp37OcrgNgv8guAFRusAACAbykl4I8A+PecAAIIIIAAAggggAACMhQAEPC0HQEEEJBJAPjx/1f83wbVqAm3rAAAAABJRU5ErkJggg==
// @require http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js
// @downloadURL https://update.greasyfork.icu/scripts/8958/Torrentz%20%3A%20The%20Bobcat%20add-on%20%28mod%29.user.js
// @updateURL https://update.greasyfork.icu/scripts/8958/Torrentz%20%3A%20The%20Bobcat%20add-on%20%28mod%29.meta.js
// ==/UserScript==
// @date 03 Apr 2015
// @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 = "