KG2CL

Ouvrir une fiche CL depuis une fiche KG

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

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

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==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>');
        }
    });