// ==UserScript== // @name IMDb: add direct 'Highest Rated Titles With' links to person page // @namespace https://greasyfork.org/en/users/8981-buzz // @description This script adds two small but very practical links to the IMDb person detail page. It links directly to the film list by job type (director or actor), sorted by rating and shows only Feature films and TV Movies. // @author buzz // @require https://code.jquery.com/jquery-2.2.0.min.js // @version 0.3 // @license GPLv2 // @match http://*.imdb.com/name/nm* // @grant none // @noframes // @downloadURL none // ==/UserScript== /* jshint -W097 */ 'use strict'; $(function($) { var imdb_id; var re = /^\/name\/(nm[0-9]{7})\//; var m = re.exec(window.location.pathname); if (m) { imdb_id = m[1]; var $f = $('#filmography'), links = []; var jobs = ['director', 'actor', 'actress', 'writer']; for (var i = 0; i < jobs.length; i++) { var job = jobs[i]; if ($f.find('a[name=' + job + ']').length === 1) { var text = job.charAt(0).toUpperCase() + job.slice(1); links.push('' + text + ''); } } $('#jumpto').before('