<commit_before>var meintopf_item_template;

function meintopf_repost(id) {
	var data = {
		action: 'meintopf_repost',
		post_id: id
	};
	// since 2.8 ajaxurl is always defined in the admin header and points to admin-ajax.php
	jQuery.post(ajaxurl, data, function(response) {
		var html = meintopf_render_item(response);
		jQuery("#item_"+response["ID"]).replaceWith(html);
	});
};

function meintopf_next_posts(page_no) {
	console.log(page_no);
	var data = {
		action: 'meintopf_next_posts',
		page_no: page_no
	};
	// since 2.8 ajaxurl is always defined in the admin header and points to admin-ajax.php
	jQuery.post(ajaxurl, data, function(posts) {
		jQuery.each(posts, function(index, value) {
			var html = meintopf_render_item(value);
			jQuery("#meintopf_feed #loader").before(html);
		});
		jQuery("#meintopf_feed #loader #load_next").off().click(function() {
				meintopf_next_posts(page_no + 1);
			});
	});
};

function meintopf_render_item(post) {
	var context = {
		title: post["post_title"],<commit_msg>left some debugging stuff in there. removing it now<commit_after>var meintopf_item_template;

function meintopf_repost(id) {
	var data = {
		action: 'meintopf_repost',
		post_id: id
	};
	// since 2.8 ajaxurl is always defined in the admin header and points to admin-ajax.php
	jQuery.post(ajaxurl, data, function(response) {
		var html = meintopf_render_item(response);
		jQuery("#item_"+response["ID"]).replaceWith(html);
	});
};

function meintopf_next_posts(page_no) {
	var data = {
		action: 'meintopf_next_posts',
		page_no: page_no
	};
	// since 2.8 ajaxurl is always defined in the admin header and points to admin-ajax.php
	jQuery.post(ajaxurl, data, function(posts) {
		jQuery.each(posts, function(index, value) {
			var html = meintopf_render_item(value);
			jQuery("#meintopf_feed #loader").before(html);
		});
		jQuery("#meintopf_feed #loader #load_next").off().click(function() {
				meintopf_next_posts(page_no + 1);
			});
	});
};

function meintopf_render_item(post) {
	var context = {
		title: post["post_title"],
{'fraction_non_alphanumeric': 0.13656387665198239, 'fraction_numerical': 0.004894762604013705, 'mean_word_length': 4.994134897360704, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6215371', 'n_tokens_mistral': 765, 'n_tokens_neox': 715, 'n_words': 158}