<commit_before>$(function(){
	$('.sidebar .top ul li').on('mouseenter', function(evt){
		
		if (evt.target.tagName != 'LI') {
			return;
		}
		$(this).parent().find('a').removeClass('cur');
		$(this).children('a').addClass('cur');

		var sbContent = $(this).parents('.top').next();
		var left = 0;

		sbContent.children().removeClass('hidden').hide();
		switch ($(this).attr('class')) {
		case 'first':
			sbContent.children('.first').show();
			left = "18px";
			break;
		case 'second':
			sbContent.children('.second').show();
			left = "114px";
			break;
		case 'last':
			sbContent.children('.last').show();
			left = "210px";
			break;
		}
		$(this).parents('.top').children('.bar').animate({left: left}, "fast");
	});

	// 侧边栏——最新帖子
	var topicRecent = function(data) {
		if (data.ok) {
			data = data.data;

			var content = '';
			for(var i in data) {
				content += '<li class="truncate">'+
						'<i></i><a href="/topics/'+data[i].tid+'" title="'+data[i].title+'">'+data[i].title+'</a>'+
						'</li>'
			}
			$('.sb-content .topic-list ul').html(content);
		}
	}

	// 侧边栏——最新博文
	var articleRecent = function(data){
		if (data.ok) {
			data = data.data;

			var content = '';
			for(var i in data) {
				content += '<li class="truncate">'+
						'<i></i><a href="/articles/'+data[i].id+'" title="'+data[i].title+'">'+data[i].title+'</a>'+
						'</li>'
			}
			$('.sb-content .article-list ul').html(content);
		}
	}

	// 侧边栏——最新开源项目
	var projectRecent = function(data){
		if (data.ok) {
			data = data.data;

			var content = '';
			for(var i in data) {
				var uri = data[i].id;
				if (data[i].uri != '') {
					uri = data[i].uri;
				}

				var title = data[i].category + ' ' + data[i].name;
				var logo = data[i].logo;

				content += '<li>'+
					'<a href="/p/'+uri+'">'+
						'<div class="logo"><img src="'+logo+'" alt="'+data[i].name+'" width="48px"/></div>'+
					'</a>'+
					'<div class="title">'+
						'<h4>'+
							'<a href="/p/'+uri+'" title="'+title+'">'+title+'</a>'+
						'</h4>'+
					'</div>'+
				'</li>';
			}
			$('.sb-content .project-list ul').html(content);
		}
	}

	// 侧边栏——最新资源
	var resourceRecent = function(data){
		if (data.ok) {
			data = data.data;

			var content = '';
			for(var i in data) {
				content += '<li class="truncate">'+
						'<i></i><a href="/resources/'+data[i].id+'" title="'+data[i].title+'">'+data[i].title+'</a>'+
						'</li>'
			}
			$('.sb-content .resource-list ul').html(content);
		}
	}

	emojify.setConfig({
		// emojify_tag_type : 'span',
		only_crawl_id    : null,
		img_dir          : SG.EMOJI_DOMAIN,
		ignored_tags     : { //忽略以下几种标签内的emoji识别
			'SCRIPT'  : 1,
			'TEXTAREA': 1,
			'A'       : 1,
			'PRE'     : 1,
			'CODE'    : 1
		}
	});
	
	// 侧边栏——最新评论
	var commentRecent = function(data){
		if (data.ok) {
			data = data.data;
			var comments = data.comments;

			var content = '';
			for(var i in comments) {
				var url = '';
				switch(comments[i].objtype) {
				case 0:
					url = '/topics/';
					break;
				case 1:
					url = '/articles/';
					break;
				case 2:
					url = '/resources/';
					break;
				case 4:
					url = '/p/';
					break;
				}
				url += comments[i].objid;

				var user = data[comments[i].uid];

				var avatar = user.avatar;
				if (avatar == "") {
					if (isHttps) {
						avatar = 'https://secure.gravatar.com/avatar/'+md5(data[i].email)+"?s=48";
					} else {
						avatar = 'http://gravatar.com/avatar/'+md5(data[i].email)+"?s=48";
					}
				} else {
					avatar = cdnDomain+'avatar/'+avatar+'?imageView2/2/w/40';
				}
				
				var cmtTime = SG.timeago(comments[i].ctime);
				if (cmtTime == comments[i].ctime) {
					var cmtTimes = cmtTime.split(" ");
					cmtTime = cmtTimes[0];
				}
				
				content += '<li>'+
					'<div class="pic">'+<commit_msg>bugfix<commit_after>$(function(){
	$('.sidebar .top ul li').on('mouseenter', function(evt){
		
		if (evt.target.tagName != 'LI') {
			return;
		}
		$(this).parent().find('a').removeClass('cur');
		$(this).children('a').addClass('cur');

		var sbContent = $(this).parents('.top').next();
		var left = 0;

		sbContent.children().removeClass('hidden').hide();
		switch ($(this).attr('class')) {
		case 'first':
			sbContent.children('.first').show();
			left = "18px";
			break;
		case 'second':
			sbContent.children('.second').show();
			left = "114px";
			break;
		case 'last':
			sbContent.children('.last').show();
			left = "210px";
			break;
		}
		$(this).parents('.top').children('.bar').animate({left: left}, "fast");
	});

	// 侧边栏——最新帖子
	var topicRecent = function(data) {
		if (data.ok) {
			data = data.data;

			var content = '';
			for(var i in data) {
				content += '<li class="truncate">'+
						'<i></i><a href="/topics/'+data[i].tid+'" title="'+data[i].title+'">'+data[i].title+'</a>'+
						'</li>'
			}
			$('.sb-content .topic-list ul').html(content);
		}
	}

	// 侧边栏——最新博文
	var articleRecent = function(data){
		if (data.ok) {
			data = data.data;

			var content = '';
			for(var i in data) {
				content += '<li class="truncate">'+
						'<i></i><a href="/articles/'+data[i].id+'" title="'+data[i].title+'">'+data[i].title+'</a>'+
						'</li>'
			}
			$('.sb-content .article-list ul').html(content);
		}
	}

	// 侧边栏——最新开源项目
	var projectRecent = function(data){
		if (data.ok) {
			data = data.data;

			var content = '';
			for(var i in data) {
				var uri = data[i].id;
				if (data[i].uri != '') {
					uri = data[i].uri;
				}

				var title = data[i].category + ' ' + data[i].name;
				var logo = data[i].logo;

				content += '<li>'+
					'<a href="/p/'+uri+'">'+
						'<div class="logo"><img src="'+logo+'" alt="'+data[i].name+'" width="48px"/></div>'+
					'</a>'+
					'<div class="title">'+
						'<h4>'+
							'<a href="/p/'+uri+'" title="'+title+'">'+title+'</a>'+
						'</h4>'+
					'</div>'+
				'</li>';
			}
			$('.sb-content .project-list ul').html(content);
		}
	}

	// 侧边栏——最新资源
	var resourceRecent = function(data){
		if (data.ok) {
			data = data.data;

			var content = '';
			for(var i in data) {
				content += '<li class="truncate">'+
						'<i></i><a href="/resources/'+data[i].id+'" title="'+data[i].title+'">'+data[i].title+'</a>'+
						'</li>'
			}
			$('.sb-content .resource-list ul').html(content);
		}
	}

	emojify.setConfig({
		// emojify_tag_type : 'span',
		only_crawl_id    : null,
		img_dir          : SG.EMOJI_DOMAIN,
		ignored_tags     : { //忽略以下几种标签内的emoji识别
			'SCRIPT'  : 1,
			'TEXTAREA': 1,
			'A'       : 1,
			'PRE'     : 1,
			'CODE'    : 1
		}
	});
	
	// 侧边栏——最新评论
	var commentRecent = function(data){
		if (data.ok) {
			data = data.data;
			var comments = data.comments;

			var content = '';
			for(var i in comments) {
				var url = '';
				switch(comments[i].objtype) {
				case 0:
					url = '/topics/';
					break;
				case 1:
					url = '/articles/';
					break;
				case 2:
					url = '/resources/';
					break;
				case 4:
					url = '/p/';
					break;
				}
				url += comments[i].objid;

				var user = data[comments[i].uid];

				var avatar = user.avatar;
				if (avatar == "") {
					if (isHttps) {
						avatar = 'https://secure.gravatar.com/avatar/'+md5(user.email)+"?s=48";
					} else {
						avatar = 'http://gravatar.com/avatar/'+md5(user.email)+"?s=48";
					}
				} else {
					avatar = cdnDomain+'avatar/'+avatar+'?imageView2/2/w/40';
				}
				
				var cmtTime = SG.timeago(comments[i].ctime);
				if (cmtTime == comments[i].ctime) {
					var cmtTimes = cmtTime.split(" ");
					cmtTime = cmtTimes[0];
				}
				
				content += '<li>'+
					'<div class="pic">'+
{'fraction_non_alphanumeric': 0.240743198407432, 'fraction_numerical': 0.008759124087591242, 'mean_word_length': 2.5496938294865754, 'pattern_counts': {'":': 0, '<': 69, '<?xml version=': 0, '>': 69, 'https://': 2, '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': '5484030', 'n_tokens_mistral': 3722, 'n_tokens_neox': 3013, 'n_words': 515}