<commit_before>_OKCP.initReaddPagination = function() {
	var lastPageElem,
		numPages,
		itemsPerPage,
		paginationElem;
	if (document.getElementById('questions')) {
		lastPageElem = $('#questions .count .last');
		itemsPerPage = 10;
	} else if (document.getElementById('p_mailbox')) {
		lastPageElem = $('#p_mailbox .count .last');
		itemsPerPage = 30;
	} else {
		return false;
	}

	numPages = lastPageElem.text()*1;
	paginationElem = $('<div class="okcp-pagination"></div>').insertAfter(lastPageElem);
	for (var i = 0, newElem, href; i < numPages; i++) {
		newElem = lastPageElem.clone();
		href = newElem.attr('href');
		href = href.split('low=')[0]+'low=' + (i*itemsPerPage+1) + '&' + href.substring(href.indexOf('&')+1);
		newElem.text(i+1)
			.attr('href',href)
			.attr('class','num');
		paginationElem.append(newElem);
	}
};<commit_msg>refactored to separate pagination url utility for messageSearch feature to use<commit_after>_OKCP.initReaddPagination = function() {
	var lastPageElem,
		numPages,
		itemsPerPage,
		paginationElem,
		urls;
	if (document.getElementById('questions')) {
		lastPageElem = $('#questions .count .last');
		itemsPerPage = 10;
	} else if (document.getElementById('p_mailbox')) {
		lastPageElem = $('#p_mailbox .count .last');
		itemsPerPage = 30;
	} else {
		return false;
	}
	urls = _OKCP.getPaginationUrls(lastPageElem, itemsPerPage);

	paginationElem = $('<div class="okcp-pagination"></div>').insertAfter(lastPageElem);
	for (var i = 0, newElem, href, length = urls.length; i < length; i++) {
		newElem = lastPageElem.clone();
		href = urls[i];
		newElem.text(i+1)
			.attr('href',href)
			.attr('class','num');
		paginationElem.append(newElem);
	}
};

_OKCP.getPaginationUrls = function(lastPageElem, itemsPerPage) {
	var urls = [];
	numPages = lastPageElem.text()*1;
	for (var i = 0, url; i < numPages; i++) {
		url = lastPageElem.attr('href');
		url = url.split('low=')[0]+'low=' + (i*itemsPerPage+1) + '&' + url.substring(url.indexOf('&')+1);
		urls.push(url);
	}
	return urls;
};
{'fraction_non_alphanumeric': 0.1837037037037037, 'fraction_numerical': 0.01037037037037037, 'mean_word_length': 4.906705539358601, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 7, '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': '5917757', 'n_tokens_mistral': 789, 'n_tokens_neox': 741, 'n_words': 140}