IMDb Weaver Documentation

Kinds of information that IMDb Weaver provides:


Headshot magnifier:
Hover mouse over headshot thumbnails to enlarge them.

See screenshots
Using the Research feature

On any IMDb Title page:

  1. Click on the Cast toolbar.
  2. Select the research mode.
    • Titles in common : This looks up the credits for selected people, identifying all the titles that at least 2 of them worked on, and listing the job(s) each person did on each title.
  3. Drag at least two names into the Research popup, (any kind of person can be selected: Actor, Director, etc.)
    Note that an additional imdb page is retrieved in the background for each selection, and processing time is proportional. (Watch the status bar for progress)
  4. Choose categories to be omitted, (for example, the "Self" category includes appearances on Oprah, Letterman, etc., which tends to clutter the result since so many people have appeared on those shows)
  5. Click for results

Preference settings:

To adjust your IMDB Weaver preferences, click the "Prefs" button in the lower-right corner of any imdb.com page.

The settings can also be accessed directly via the Mozilla config page, by selecting Help->About:?->about:config. To constrain this list to IMDb Weaver preferences only, type: "imdb weaver" into the Filter field. The preference names have the greasemonkey-determined prefix: "greasemonkey.scriptvals.http://refactoror.net//IMDb Weaver."):

Preference Name Default Description
All pages
prefsMenuPosition BR Determines in which corner of the screen the Prefs menu button appears. Valid values are:
  • TL : Top-left corner
  • TR : Top-right corner
  • BL : Bottom-left corner
  • BR : Bottom-right corner
highlightTitleTypes true Highlight titles by type. (Applicable to Name pages and Find results.)
removeAds true Block various forms of advertising. This feature is able to block ads that are served directly from imdb.com that generic ad blockers tend to miss. Note that IMDb continues to add exciting new forms of advertising that this script might miss. (I highly recommend Adblock Plus for general purpose ad blocking.)
Title pages
title-attributes true Display rating/runtime/language directly below title. This information is gathered from elsewhere on the page for convenience reference.
title-ShowAges true Add [Show Ages] button in the Cast title bar to compute the age of each cast member, as of the time of the title release.
title-StartResearch true Add [Research] button in the Cast title bar, which opens the Research dialog box.
title-headshotMagnifier true Hovering the mouse magnifies cast pictures.
title-headshotMagnification 12 Controls the level of magnification of headshots. This value times 32, is the number of pixels of the longest edge of a given photo.
Name pages
name-headshotMagnifier true Hovering the mouse magnifies pictures in Works With section.
name-ShowAge true Display the current age of the person in the birth details section.
name-ShowAgeAtTitleRelease true If arriving from a title page, display the age of the person, as of the date of that title release, in the birth details section.
Find page
firstMatchAccessKey A Alt-Shift keystroke to navigate to first title matched on the search results page.
Advanced Settings
ajaxOperationLimit 10 Limits how many items are processed at one time where it involves retrieving additional pages in the background. This is a performance tuning parameter. For example, computing the age of each cast member on a title page requires the retrieval of each persons name page. (Set to -1 for unlimited -- browser may prompt if you want to kill a long running script.)
loggerLevel WARN Controls the level of information that the script sends to the Error Console. Ranked from least to most verbose:
  • ERROR : Only messages indicating problems with the script
  • WARN : Include information about recoverable problems
  • INFO : Include general progress information as the script executes
  • DEBUG : Include diagnostics about script details


Wishlist:


How the IMDb Weaver script works:

Upon loading a given IMDb page the JavaScript document object for that particular type of IMDb page, (i.e., a Title page, a Name page), is extended with accessor methods; "bean methods" in Java parlance. These "getters" encapsulate the logic needed for retrieving various kinds of information on page. For example, in code that deals with Title pages you can see references like: titleDoc.getTitle(), titleDoc.getReleaseYear(), titleDoc.getRuntime(), etc. In code that deals with Name pages you can see: nameDoc.getName(), nameDoc.getAge(), etc.

This accessor logic is implemented in terms of XPath expressions, which is a pattern language for accessing page elements. It is more reliable and much less fragile than coding parent/child navigations directly on the DOM objects. (Despite concerns, XPath operations require negligible processing time.)

AJAX techniques are used to retrieve information from related pages. For example, "Show Ages" retrieves the relevant Name pages in the background in order to calculate the age, at time of title release, of each cast member. Each retrieved document body is incorporated into the title document being viewed as invisible iframes. When a page is requested it is cached, therefore subsequent references are "free" while still viewing the same page.

For a relatively concise example of these things coming together see the showCastAges() function, which executes from IMDb Title pages.