{"size": 1223, "ext": "js", "max_stars_repo_path": "app/assets/javascripts/admin/social_in_post_admin.js", "max_stars_repo_name": "themarshallproject/open-endrun", "max_stars_repo_stars_event_min_datetime": "2016-10-19T20:24:30.000Z", "max_stars_repo_stars_event_max_datetime": "2021-02-19T23:06:36.000Z", "max_issues_repo_path": "app/assets/javascripts/admin/social_in_post_admin.js", "max_issues_repo_name": "themarshallproject/open-endrun", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "app/assets/javascripts/admin/social_in_post_admin.js", "max_forks_repo_name": "themarshallproject/open-endrun", "max_forks_repo_forks_event_min_datetime": "2017-02-18T15:52:50.000Z", "max_forks_repo_forks_event_max_datetime": "2021-02-27T18:39:52.000Z"}
{"max_stars_count": 40, "max_issues_count": null, "max_forks_count": 9, "avg_line_length": 39.4516129032, "max_line_length": 131, "alphanum_fraction": 0.6304170074}
// // disabled 20151103
//
// $(document).ready(function() {
// 	if (window.is_post_index_admin === undefined) {
// 		return false;
// 	}

// 	var median = function(arr) {
// 		var sorted = arr.sort(function(a, b){return a-b});
// 		var offset = Math.floor(sorted.length/2.0);
// 		return sorted[offset];
// 	}

// 	$.getJSON('/admin/thriller/social_snapshot').done(function(json) {	
// 		var facebook_counts = json.links.map(function(item) { return item.facebook });
// 		var facebook_median = median(facebook_counts);
		
// 		var twitter_counts = json.links.map(function(item) { return item.twitter });
// 		var twitter_median = median(twitter_counts);

// 		json.links.forEach(function(link) {
// 			var $fb = $('.post-admin-index-social-facebook[data-url="'+link.url+'"]');
// 			$fb.find('a').html(link.facebook);
// 			$fb.find('a').attr('title', Math.round(100.0*link.facebook/facebook_median, 1)+"% of Facebook median ("+facebook_median+")");

// 			var $tw = $('.post-admin-index-social-twitter[data-url="'+link.url+'"]');
// 			$tw.find('a').html(link.twitter);
// 			$tw.find('a').attr('title', Math.round(100.0*link.twitter/twitter_median, 1)+"% of Twitter median ("+twitter_median+")");
// 		});
// 	});
// });