<commit_before>function showMatches() {
	// var matches=$('body').text().replace(/[13n][1-9A-Za-z][^OIl]{20,40}/,"REPLACED");
	$('.txlist-address span').html(function(index,html) {
		var mod=html;
		for(i=0;i<localStorage.length;i++) {
			var key=localStorage.key(i);
			mod=mod.replace(key,localStorage.getItem(key));
		}
		return mod;
	});
}

document.addEventListener('contextmenu',handleContextMenu,false);
safari.self.addEventListener("message",handleMessage,false);
	
function handleContextMenu(event) {
	var addr=window.getSelection().toString().match(/^[13n][1-9A-Za-z][^OIl]{20,40}$/);
	if(addr!=null)
	  safari.self.tab.setContextMenuEventUserInfo(event,addr);
}

function handleMessage(event) {
	if(event.name==="addLabel") {
		var label=prompt("Label for "+event.message,localStorage.getItem(event.message));
		if(label==null) {
			return;
		}
		else if(label==="") {
			localStorage.removeItem(event.message);
		}
		else {
			localStorage.setItem(event.message,label);
			$('.txlist-address span').html(function(index,html) {
				return html.replace(event.message,label);<commit_msg>Include addresses starting with m;<commit_after>function showMatches() {
	// var matches=$('body').text().replace(/[13n][1-9A-Za-z][^OIl]{20,40}/,"REPLACED");
	$('.txlist-address span').html(function(index,html) {
		var mod=html;
		for(i=0;i<localStorage.length;i++) {
			var key=localStorage.key(i);
			mod=mod.replace(key,localStorage.getItem(key));
		}
		return mod;
	});
}

document.addEventListener('contextmenu',handleContextMenu,false);
safari.self.addEventListener("message",handleMessage,false);
	
function handleContextMenu(event) {
	var addr=window.getSelection().toString().match(/^[13nm][1-9A-Za-z][^OIl]{20,40}$/);
	if(addr!=null)
	  safari.self.tab.setContextMenuEventUserInfo(event,addr);
}

function handleMessage(event) {
	if(event.name==="addLabel") {
		var label=prompt("Label for "+event.message,localStorage.getItem(event.message));
		if(label==null) {
			return;
		}
		else if(label==="") {
			localStorage.removeItem(event.message);
		}
		else {
			localStorage.setItem(event.message,label);
			$('.txlist-address span').html(function(index,html) {
				return html.replace(event.message,label);
{'fraction_non_alphanumeric': 0.1955736224028907, 'fraction_numerical': 0.015356820234869015, 'mean_word_length': 6.07667731629393, 'pattern_counts': {'":': 0, '<': 5, '<?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': '700554', 'n_tokens_mistral': 848, 'n_tokens_neox': 774, 'n_words': 83}