Secret Cinema Enhancer

Display changes for Secret Cinema

スクリプトをインストールするには、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           Secret Cinema Enhancer
// @namespace      surrealmoviez.info
// @description    Display changes for Secret Cinema
// @include        http://www.secret-cinema.net/viewtopic.php?id=*
// @require        http://code.jquery.com/jquery-1.11.1.min.js
// @grant          none
// @version        0.0.1
// ==/UserScript==

$(document).ready(function () {
    if ($('.firstpost .postmsg .dt_pl').length === 2) {
        var description = $('.firstpost .postmsg').html();
        var pattern = /(tt\d+)/gi;
        var found = description.match(pattern);

        if (found.length > 0) {
            var uniqueIds = [];
            $.each(found, function (i, el) {
                if ($.inArray(el, uniqueIds) === -1)
                    uniqueIds.push(el);
            });

            var imdbIdRowContent = "";
            for (var i = 0; i < uniqueIds.length; i++) {
                imdbIdRowContent += '<a href="http://anonym.to/?http://www.imdb.com/title/' + uniqueIds[i] + '/" target="_blank">' + uniqueIds[i] + '</a> ';
            }
        }

        $('.firstpost .postmsg').prepend('<blockquote>' + imdbIdRowContent + '</blockquote>');
    }
});