Links on Netflix - IMDB, Metacritic, Rotten Tomatoes

Add search links to Netflix titles

As of 2020-01-12. See the latest version.

You will need to install an extension such as Tampermonkey, Greasemonkey 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 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.

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

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

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         Links on Netflix - IMDB, Metacritic, Rotten Tomatoes
// @description  Add search links to Netflix titles
// @version      0.3
// @author       mica
// @namespace    greatest.deepsurf.us/users/12559
// @include      https://www.netflix.com/*
// @require      https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js
// @grant        none
// ==/UserScript==

(function() {
    $('head').append(`<style>
        a.slnk {margin-right: 8px;}
        a.slnk img {width: 20px; height: 20px;}
        </style>`);
    var url;
    setInterval(function() {
        if (url != location.href) {
            url = location.href;
            setTimeout(function() {
                $('a.slnk').remove();
                if ($('.title:last').text() != '') {
                    var title = $('.title:last').text();
                } else {
                    var title = $('img.logo:last').attr('alt');
                }
                var imdb = 'https://www.imdb.com/find?s=tt&ref_=fn_tt&q=' + encodeURIComponent(title);
                $('<a>').attr('href', imdb).attr('target', '_blank').addClass('slnk')
                    .html('<img src="https://www.imdb.com/favicon.ico">')
                        .appendTo('div.meta:last');
                var mc = 'https://www.metacritic.com/search/all/' + encodeURIComponent(title.replace(/\*|\//g,' ')) + '/results';
                $('<a>').attr('href', mc).attr('target', '_blank').addClass('slnk')
                    .html('<img src="https://www.metacritic.com/favicon.ico">')
                        .appendTo('div.meta:last');
                var rt = 'https://www.rottentomatoes.com/search/?search=' + encodeURIComponent(title);
                $('<a>').attr('href', rt).attr('target', '_blank').addClass('slnk')
                    .html('<img src="https://www.rottentomatoes.com/favicon.ico">')
                        .appendTo('div.meta:last');
            }, 1100);
        }
    }, 300);
})();