Kinopoisk and IMDB torrent download

Allows to search for torrents (via Torrtilla site) on 2 major movies databases: Kinopoisk and IMDB

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name        Kinopoisk and IMDB torrent download
// @description Allows to search for torrents (via Torrtilla site) on 2 major movies databases: Kinopoisk and IMDB
// @namespace   torrents
// @include     http://www.imdb.com/title/*
// @include     http://www.kinopoisk.ru/film/*
// @version     1
// @grant       none
// ==/UserScript==
$(document).ready(function(){
    if (window.location.href.indexOf('kinopoisk')===-1)
    {     
        var header=$('.header');
        var title_and_year=header.find('span[itemprop=name]').text()+' '+header.find('span.nobr').text().replace('(', '').replace(')', '');
        var m_left=-2;
    }
    else
    {
        var header=$('.moviename-big');
        var title_and_year=$('span[itemprop=alternativeHeadline]').text()+' '+$('#infoTable').find('A:first').text();
        var m_left=5;
    }

    var link='<A target="_blank" href="http://torrtilla.ru/torrents/'+encodeURIComponent(title_and_year)+'#movies"><IMG src="https://lh6.googleusercontent.com/hVNzW9m-TLQ0Z3WrtOnTyJg1uOS0d8P8CT29sm_ZaqBhuRgDLnnArtGR6q4nSgnQS-_DNHis7Q=s32-h32-e365" alt="torrtilla" style="vertical-align:-20%; margin-left:'+m_left+'px;"></A>';
  
    header.append(link);
});