// ==UserScript==
// @name           Wolf BBS image changer
// @namespace      http://hon5.com/
// @author         Aoba <aoba@hon5.com>
// @description    change character's image to old one.
// @include        http://ninjinel.x0.com/wolfc/*
// @include        http://ninjin002.x0.com/wolff/*
// ==/UserScript==

// Version 20090527

(function() {
  function main(doc) {
    var imgs = doc.getElementsByTagName("img");
    for(var i=0; i<imgs.length; i++) {
      if (imgs[i].src.match(/plugin_wolf\/img\/(?:face|body)(?:0[1-9]|1[0-7])\.jpg/)) {
        imgs[i].src = "http://ninjin001.x0.com/wolfe/" + RegExp.lastMatch;
      }
    }
  }
  
  main(document);
  if (window.AutoPagerize && window.AutoPagerize.addFilter) {
    window.AutoPagerize.addFilter(function (nodes) {
      nodes.forEach(main);
    });
  }
})();