User:Faster than Thunder/Thunderminator.js
Appearance
Code that you insert on this page could contain malicious content capable of compromising your account. If you import a script from another page with "importScript", "mw.loader.load", "iusc", or "lusc", take note that this causes you to dynamically load a remote script, which could be changed by others. Editors are responsible for all edits and actions they perform, including by scripts. User scripts are not centrally supported and may malfunction or become inoperable due to software changes. A guide to help you find broken scripts is available. If you are unsure whether code you are adding to this page is safe, you can ask at the appropriate village pump. This code will be executed when previewing this page. |
![]() | Documentation for this user script can be added at User:Faster than Thunder/Thunderminator. |
// 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();
}
}
}