This wiki is a XML full dump clone of "Heroes Wiki", the main wiki about the Heroes saga that has been shut down permanently since June 1, 2020. The purpose of this wiki is to keep online an exhaustive and accurate database about the franchise.

User:Hardvice/imdbfullcast.js

From Heroes Wiki
Revision as of 00:41, 9 October 2007 by imported>Hardvice (New page: // ==UserScript== // @name IMDb fullcast // @namespace imdb.com // @description Rewrites IMDb title links to point to full cast articles. // @include http://imdb.c...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
// ==UserScript==
// @name           IMDb fullcast
// @namespace      imdb.com
// @description    Rewrites IMDb title links to point to full cast articles.
// @include        http://imdb.com/*
// @include        http://*.imdb.com/*
// ==/UserScript==

var titles = document.evaluate(
    '//a[contains(@href, "/title/")]',
    document,
    null,
    XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,
    null);
for (var i = 0; i < titles.snapshotLength; i++) {
    titles.snapshotItem(i).href += 'fullcredits#cast';
}