<commit_before>/**************************
 Script to convert EPrint 
 front page boxes into 
 Bootstrap panels 
***************************/
var j = jQuery.noConflict();

j(document).ready(function () {

	//initialisting	
	var panel = j('.ep_toolbox');	
	var unwrap = j('.ep_toolbox_content');
	var panelHeading = j('.ep_toolbox a'); 
	if (j('.ep_toolbox_content b').length){
		j('.ep_toolbox_content b').wrap('<div class="panel-body"></div>');
		
	}else {
		j('.ep_toolbox_content').contents().each(function(){
			 if(this.nodeName == "#text" && j.trim(this.nodeValue) !== ''){
        			j(this).wrap('<div class="panel-body"><p></p></div>');
    			} 
		});
	}
	
	//remove that b and replace with strong
	j('.ep_toolbox_content b').replaceWith(function(){
		return j('<strong>').html(j(this).html());
	});

	//add the classes and the wrappers	
	panel.addClass('panel panel-default panel-docklands-fp');
	//panelTextNode.wrap('<div class="panel-body"><p></p></div>');
	panelHeading.wrap('<div class="panel-heading"><h3 class="panel-title"></h3></div>');
	
	// Removing some stuff that isnt needed
	panel.find('br').remove();
	unwrap.children().unwrap();
	//j('.panel .panel-body p').is(':empty').remove();
	panel.removeClass('ep_toolbox').addClass('frontpage-panel');


	var summary_panel = j('.ep_summary_box');
	var summary_panel_header = j('.ep_summary_box .ep_summary_box_title');
	var summary_panel_body = j('.ep_summary_box_body');
<commit_msg>more comment sot understand issue<commit_after>/**************************
 Script to convert EPrint 
 front page boxes into 
 Bootstrap panels 
***************************/
var j = jQuery.noConflict();

j(document).ready(function () {

	//initialisting	
	var panel = j('.ep_toolbox');	
	var unwrap = j('.ep_toolbox_content');
	var panelHeading = j('.ep_toolbox a'); 
		
	//front page
	if (j('.ep_toolbox_content b').length){
		j('.ep_toolbox_content b').wrap('<div class="panel-body"></div>');
		
	}else {
		j('.ep_toolbox_content').contents().each(function(){
			 if(this.nodeName == "#text" && j.trim(this.nodeValue) !== ''){
        			j(this).wrap('<div class="panel-body"><p></p></div>');
    			} 
		});
	}
	
	//remove that b and replace with strong
	j('.ep_toolbox_content b').replaceWith(function(){
		return j('<strong>').html(j(this).html());
	});

	//add the classes and the wrappers	
	panel.addClass('panel panel-default p');
	//panelTextNode.wrap('<div class="panel-body"><p></p></div>');
	panelHeading.wrap('<div class="panel-heading"><h3 class="panel-title"></h3></div>');
	
	// Removing some stuff that isnt needed
	panel.find('br').remove();
	
	//unwrapping it
	unwrap.children().unwrap();

	//j('.panel .panel-body p').is(':empty').remove();
	panel.removeClass('ep_toolbox').addClass('frontpage-panel');


	var summary_panel = j('.ep_summary_box');
	var summary_panel_header = j('.ep_summary_box .ep_summary_box_title');
	var summary_panel_body = j('.ep_summary_box_body');

{'fraction_non_alphanumeric': 0.2328581126951799, 'fraction_numerical': 0.0013577732518669382, 'mean_word_length': 4.700193423597679, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 33, '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': '981625', 'n_tokens_mistral': 1018, 'n_tokens_neox': 965, 'n_words': 180}