<commit_before>function img_resize_normal(w, text){
  for (i=0;i<document.images.length;i++)
   {
   if (document.all){
	if (document.images[i].width>w)
	 {
	    newHeight=document.images[i].height*w/document.images[i].width;
	    document.images[i].width=w;
	    document.images[i].height=newHeight;
       try{
	       document.images[i].outerHTML='<a href="'+document.images[i].src+'" target="_blank" title="'+text+'">'+document.images[i].outerHTML+'</a>';
  	 	}catch(e){}
  	 }
   }
  else{
	if (document.images[i].width>w) {
	  document.images[i].title=text;
	  document.images[i].style.cursor="pointer";
	    newHeight=document.images[i].height*w/document.images[i].width;
	    document.images[i].width=w;
	    document.images[i].height=newHeight;  
	  document.images[i].onclick=function(e){window.open(this.src)};
	}
  }
  }
}
function img_resize_lightbox(w){
  $('img').each(function(){
    var myw = $(this).attr('width');
    var myh = $(this).attr('height');
    if(myw > w)
    {
	var newh = myh * w / myw;
        $(this).attr({'width': w, 'height': newh});

        $(this).wrap('<a href="' + $(this).attr('src') + '" class="lightbox"></a>');
    }
  });
 $('a.lightbox').lightBox({
    imageBtnClose: '/plugins/img_resize/images/lightbox-btn-close.gif',
    imageBtnPrev: '/plugins/img_resize/images/lightbox-btn-prev.gif',
    imageBtnNext: '/plugins/img_resize/images/lightbox-btn-next.gif',
    imageLoading: '/plugins/img_resize/images/lightbox-ico-loading.gif',
 });
}
<commit_msg>fix img_resize<commit_after>function img_resize_normal(w, text){
  for (i=0;i<document.images.length;i++)
   {
   if (document.all){
	if (document.images[i].width>w || document.images[i].style.width>w)
	 {
	    var newHeight=document.images[i].height*w/document.images[i].width;
	    document.images[i].width=w;
	    document.images[i].height=newHeight;
	    document.images[i].style.width=w;
	    document.images[i].style.height=newHeight;  
       try{
	       document.images[i].outerHTML='<a href="'+document.images[i].src+'" target="_blank" title="'+text+'">'+document.images[i].outerHTML+'</a>';
  	 	}catch(e){}
  	 }
   }
  else{
	if (document.images[i].width>w || document.images[i].style.width>w) {
	  document.images[i].title=text;
	  document.images[i].style.cursor="pointer";
	    var newHeight=document.images[i].height*w/document.images[i].width;
	    document.images[i].width=w;
	    document.images[i].height=newHeight;
            $(document.images[i]).css({'width': w, 'height':newHeight});
	  document.images[i].onclick=function(e){window.open(this.src)};
	}
  }
  }
}
function img_resize_lightbox(w){
  $('img').each(function(){
    var myw = $(this).attr('width');
    var myh = $(this).attr('height');
    if(myw > w)
    {
	var newh = myh * w / myw;
        $(this).attr({'width': w, 'height': newh});
        $(this).css({'width': w, 'height': newh});

        $(this).wrap('<a href="' + $(this).attr('src') + '" class="lightbox"></a>');
    }
  });
 $('a.lightbox').lightBox({
    imageBtnClose: '/plugins/img_resize/images/lightbox-btn-close.gif',
    imageBtnPrev: '/plugins/img_resize/images/lightbox-btn-prev.gif',
    imageBtnNext: '/plugins/img_resize/images/lightbox-btn-next.gif',
    imageLoading: '/plugins/img_resize/images/lightbox-ico-loading.gif',
 });
}

{'fraction_non_alphanumeric': 0.20784198113207547, 'fraction_numerical': 0.0005896226415094339, 'mean_word_length': 3.383720930232558, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '418350', 'n_tokens_mistral': 1233, 'n_tokens_neox': 1199, 'n_words': 134}