User:Faster than Thunder/Thunderminator.js

Source: Wikipedia, the free encyclopedia.
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
// Thunderminator will be a tool used to remove bad content on user pages. Do not remove anything here!
var Thunderminator_blacklist = ["I will kill you", "Kill yourself", "I will block you", "You may be blocked", "You will be blocked", "Scram", "Fuck", "Vulvagina", "Peniscrotum"];
var text = document.getElementById("bodyContent").innerHTML; // This will get the display of the page.
function warn() {
	if (!warned) {
		// Get the number of warnings the user has.
		if (warnings == 4) {
			// Block the user
		} else {
			
		}
	}
}
if(
    document.getElementById("firstHeadingTitle") &&
	document.getElementById("firstHeadingTitle").innerHTML[0] == "U" &&
	document.getElementById("firstHeadingTitle").innerHTML[1] == "s" &&
	document.getElementById("firstHeadingTitle").innerHTML[2] == "e" &&
	document.getElementById("firstHeadingTitle").innerHTML[3] == "r" &&
	document.getElementById("firstHeadingTitle").innerHTML[4] == ":" &&
	document.getElementById("firstHeadingTitle").innerHTML.has("/common.js") == false
) {
	while (true) {
		var letter = 0;
		var item = 0;
		var letter2 = 0;
		var warned = false;
		var censored = false;
		while (item < Thunderminator_blacklist.length) {
			while (text.has(Thunderminator_blacklist[item])) { // Will remove all appearences of the bad string instead of only one.
				if (text.indexOf(Thunderminator_blacklist[item]) >= 0) {
					censored = true;
					letter = text.indexOf(Thunderminator_blacklist[item]);
					letter2 = 0;
					while (letter2 < Thunderminator_blacklist[item].length) {
						text[letter + letter2] = "*";
						letter2 = letter2 + 1;
					}
				}
			}
			item = item + 1;
		}
		if (censored) {
			document.getElementById("bodyContent").innerHTML = text;
			warn();
		}
	}
}