text: // Generated by CoffeeScript 1.12.6
  (function() {
    var link2img;
  
    $(document).ready(function() {
      console.log("v2ex.link2img", link2img(), "个");
    });
  
    link2img = function() {
      var a, a_img, b, has_img, img_html, img_link, skip, this_img;
      a = $('div.reply_content > a');
      a_img = a.filter('[href$=".jpg"],[href$=".JPG"],[href$=".png"],[href$=".PNG"],[href$=".gif"],[href$=".GIF"],[href$=".webp"],[href$=".WEBP"]');
      b = 0;
      skip = 0;
      while (b < a_img.length) {
        this_img = a_img.eq(b);
        has_img = this_img.find("img").length;
        if (has_img === 0) {
          img_link = this_img.attr("href");
          img_html = "<img src=\"" + img_link + "\">";
          a_img.html(img_html);
          a_img.attr("target", "_blank");
        } else {
          skip++;
        }
        b++;
      }
      console.log("跳过", skip.toString(), "个图片");
      return b.toString();
    };
  
  }).call(this);
  