Greasy Fork

来自缓存

Greasy Fork is available in English.

IMDb: 'Highest Rated Titles' quick links for person page

This script adds small but very practical links to the IMDb person detail page. It links directly to the film list by job type (director, writer and actor), sorted by rating and shows only Feature films and TV Movies.

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name           IMDb: 'Highest Rated Titles' quick links for person page
// @namespace      http://greasyfork.icu/en/users/8981-buzz
// @description    This script adds small but very practical links to the IMDb person detail page. It links directly to the film list by job type (director, writer and 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.5
// @license        GPLv2
// @match          *://*.imdb.com/name/nm*
// @grant          none
// @noframes
// ==/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('<a href="/filmosearch?explore=title_type&role=' + imdb_id + '&ref_=filmo_ref_job_typ&sort=user_rating,desc&mode=detail&page=1&job_type=' + job +
            '&title_type=movie%2CtvMovie" title="Show movies by rating (' + text + ')">' + text + '</a>');
      }
    }
    $('#jumpto').before('<div id="job-quicklinks">Quicklinks (by Rating): ' + links.join(' <span class="ghost">|</span> ') + '</div>');
  }
});