User:Quarl/imdb canonicalize.js

// User:Quarl/imdb_canonicalize.js - canonicalizes IMDB external links

// Example: IMDB Entry becomes //

// requires: wikipage.js, util.js, addlilink.js

// quarl 2006-02-06 initial version

//

imdbz = new autoedit(   'imdbz',    'ImdbZ',    'ca-imdbz',    'Canonicalize IMDB links',    'IMDB canonicalization');

imdbz.buildRegExp = function { return new RegExp(       '\\|name)/(?:tt|nm)([0-9+)/?[^\\]]*\\]'); }

imdbz.replaceRegExp = function(d, m) { var type = m[1]; var idnum = m[2]; if (type == 'name') { return ''; } else if (type == 'title') { return ''; }   alert ("## internal error 781cea49-9cb7-44b1-8656-368608c5457c"); return null; }

imdbz._load = function { imdbz.addTab; }

$(imdbz._load);

//