Add Link To IMDB Code

Add Link To IMDB Code Like "tt1234567"

Version vom 10.10.2017. Aktuellste Version

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

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

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

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

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

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Add Link To IMDB Code
// @namespace    http://tampermonkey.net/
// @version      0.0.2
// @description  Add Link To IMDB Code Like "tt1234567"
// @author       Mumumi
// @include      *
// @exclude      *greasyfork.org*
// @grant        none
// @require      http://code.jquery.com/jquery-2.2.4.min.js
// ==/UserScript==

var slist = ["IMDb", "IMDB", "imdb", "Imdb", "iMdb", "imDb", "imdB", "IMdb", "ImDb", "ImdB", "iMDb", "iMdB", "imDB", "IMdB", "ImDB", "iMDB"];
for (var i in slist) {
    $(":contains(" + slist[i] + ")")
        .children(":not(:contains(" + slist[i] + "))")
        .parent()
        .last()
        .parent()
        .each(function() {
        var html = $(this).html();
        $(this).html(html.replace(/([^/])(tt\d{7})/i,"$1<a href=\"http://www.imdb.com/title/$2/\">$2</a>"));
    });
}