subtitleLinks

Basic script for imdb.com.This script is provide to subtitle link of movie.

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

You will need to install an extension such as Tampermonkey to install this script.

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @name           subtitleLinks
// @version        1.0
// @namespace      akursat.com/script
// @author         akursat
// @description    Basic script for imdb.com.This script is provide to subtitle link of movie.
// @require        http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
// @include        http://www.imdb.com/title/*
// @run-at         document-end
// ==/UserScript==

/* @require annotation need version 0.8. You must sure running with Greasemonkey version 0.8.
 */


//Avoiding some conflit.
this.$ = this.jQuery = jQuery.noConflict(true);

$(document).ready(function() {
       
    //Get title of Movie
    function getTitle() {
            var title = $('h1.header').children('.itemprop').text();
            return title;
        }
    //Create container.
    function createDiv() {
            $('#img_primary').append(
                $('<div/>')
                .attr("id", "container")
                .addClass("container")
                .css("border", "none")
                .css("width", "190px")
                .css("margin-left", "10px")
                .css("margin-top", "10px")
            );
        }
    //Create fav icons.
    function createFavIcon(id, src, href) {
        $('#container').append(
            $('<a/>')
            .attr("id", id)
            .attr("href", href)
            .attr("target", "_blank")
            .html(
                $('<img/>')
                .attr("src", src)
                .css("border","5px;none;")
            )
        );
        $('#' + id).css('padding-left', "10px");
    }

    //Create search links.
    var movie_name = getTitle();
    var turkcealtyazi = "http://www.turkcealtyazi.org/find.php?cat=sub&find=" + movie_name;
    var turkcealtyaziImg = "http://www.turkcealtyazi.org/images/favicon.ico";

    var divxplanet = "http://divxplanet.com/index.php?page=arama&arama=" + movie_name;
    var divxplanetImg = "http://divxplanet.com/favicon.ico";

    var opensubtitle = "http://www.opensubtitles.org/en/search2/sublanguageid-all/moviename-" + movie_name;
    var opensubtitleImg = "http://static.opensubtitles.org/favicon.ico";

    createDiv();
    createFavIcon("turkcealtyaziImg", turkcealtyaziImg, turkcealtyazi);
    createFavIcon("divxplanetImg", divxplanetImg, divxplanet);
    createFavIcon("opensubtitleImg", opensubtitleImg, opensubtitle);

});