KG2CL

Ouvrir une fiche CL depuis une fiche KG

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// ==UserScript==
// @name        KG2CL
// @namespace   https://www.cinelounge.org/
// @description Ouvrir une fiche CL depuis une fiche KG
// @author      tadanobu
// @icon        https://www.cinelounge.org/images/logot.png
// @include     https://karagarga.in/details.php?id=*
// @version     2.6
// @grant       none
// @require http://code.jquery.com/jquery-3.3.1.min.js
// ==/UserScript==
$("td:contains(Internet Link)")
    .next().text(function(){
        if ($(this).text().indexOf("imdb") >= 0) {
            if ($(this).text().indexOf("https") >= 0) {
                var imdb = $(this).text().substr(29,8);
            }
            else {
                var imdb = $(this).text().substr(28,8);
            }
            var title = $("h1").html().substring($("h1").html().lastIndexOf("-")+2,$("h1").html().lastIndexOf("(")-1).replaceAll(' ','_').replaceAll(/[^a-zA-Z0-9-_]/g, '').split('aka')[0].split('AKA')[0];
            $(this).html('<a href="https://www.cinelounge.org/imdb2cl/' + imdb + '-' + title + '" target="_blank" ><img src=\'https://www.cinelounge.org/images/logot.png\' style=\'vertical-align: middle; width: 18px;\' title=\'Fiche CinéLounge\' /></a> <a href="http://www.imdb.com/title/tt' + imdb + '" target="_blank" ><img src=\'https://ia.media-imdb.com/images/G/01/imdb/images/favicon-2165806970\' style=\'vertical-align: middle; width: 20px;\' title=\'Fiche IMDb\' /></a>');
        }
    });