<commit_before>var oldInnerHTML = window.document.body.innerHTML;

var modifying = false;
var enabled = false;

var hideElements=[
	'_5gl-',//photobar
	'_32jt',//addfriend
	'share_root',//share
	'comment_link',//commentlink
	'UFIAddComment',//commentbox
	'UFILikeLink',//likelink
	'FriendRequestAdd',//friendrequest button
	'addButton',//friendrequest button
]

self.port.on('disabled',function(){
	creepModeOff();
});

self.port.on('enabled',function(){
	creepModeOn();
});

document.body.addEventListener("DOMSubtreeModified",function(){
	if(!modifying){
//		console.log('tree modified! '+new Date());
		hideStuff();
	}
},false);

function creepModeOff(){
	enabled = false;
	modifying=true;
	window.document.body.innerHTML=oldInnerHTML;
	modifying=false;
//	console.log("Creep Mode turned off");
}

function creepModeOn(){
	enabled = true;
	oldInnerHTML = window.document.body.innerHTML;
//	console.log("Creep Mode turned on");

	hideStuff();
}

function hideStuff(){
	if(enabled){
		modifying=true;
		for(var i=0;i<hideElements.length;++i){
//			console.log('hiding \''+hideElements[i]+'\'');
			hideClassElements(hideElements[i]);
		}
		modifying=false;
	}
}

function hideClassElements(className){
	var elements = document.getElementsByClassName(className);
	
	for(var i=0;i<elements.length;++i){
		elements[i].style.display="none";
	}
}
<commit_msg>changed 're-show' code to set display:inline<commit_after>var modifying = false;
var enabled = false;

var hideElements=[
	'_5gl-',//photobar
	'_32jt',//addfriend
	'share_root',//share
	'comment_link',//commentlink
	'UFIAddComment',//commentbox
	'UFILikeLink',//likelink
	'FriendRequestAdd',//friendrequest button
	'addButton',//friendrequest button
]

self.port.on('disabled',function(){
	creepModeOff();
});

self.port.on('enabled',function(){
	creepModeOn();
});

document.body.addEventListener("DOMSubtreeModified",function(){
	if(!modifying){
		hideStuff();
	}
},false);

function creepModeOff(){
	enabled = false;
	showStuff();
}

function creepModeOn(){
	enabled = true;
	hideStuff();
}

function hideStuff(){
	if(enabled){
		modifying=true;
		for(var i=0;i<hideElements.length;++i){
			hideClassElements(hideElements[i]);
		}
		modifying=false;
	}
}

function showStuff(){
	modifying=true;
	for(var i=0;i<hideElements.length;++i){
		showClassElements(hideElements[i]);
	}
	modifying=false;
}

function hideClassElements(className){
	var elements = document.getElementsByClassName(className);
	
	for(var i=0;i<elements.length;++i){
		elements[i].style.display="none";
	}
}

function showClassElements(className){
	var elements = document.getElementsByClassName(className);
	
	for(var i=0;i<elements.length;++i){
		elements[i].style.display="inline";
	}
}

{'fraction_non_alphanumeric': 0.1729849098270151, 'fraction_numerical': 0.004416635995583364, 'mean_word_length': 5.987146529562982, 'pattern_counts': {'":': 0, '<': 9, '<?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': '1255832', 'n_tokens_mistral': 984, 'n_tokens_neox': 944, 'n_words': 145}