Stfu terrorist
Printable View
lets all change are names everyday /fmm
Since it's modified code from another extension (I don't know JS), there are two parts: a list of arrays, and a list of statements. It says to pick a random number in one of the arrays when a string is matched, but there's only one string in each array, so that's the one it picks.
Searches for strings:
Code:var rand_num;
var it = document.createNodeIterator(document.body, NodeFilter.SHOW_TEXT);
for (var txt = it.nextNode(); txt !== null; txt = it.nextNode()) {
if (txt.textContent.toLowerCase().indexOf("unabomber") != -1) {
rand_num = Math.floor(Math.random() * Toxin.length);
txt.textContent = txt.textContent.replace(/unabomber/i, Toxin[rand_num]);
}
if (txt.textContent.toLowerCase().indexOf("jack frost") != -1) {
rand_num = Math.floor(Math.random() * Czar.length);
txt.textContent = txt.textContent.replace(/jack frost/i, Czar[rand_num]);
}
if (txt.textContent.toLowerCase().indexOf("jussofresh") != -1) {
rand_num = Math.floor(Math.random() * Obama.length);
txt.textContent = txt.textContent.replace(/jussofresh/i, Obama[rand_num]);
}
if (txt.textContent.toLowerCase().indexOf("cokewatch") != -1) {
rand_num = Math.floor(Math.random() * Coke.length);
txt.textContent = txt.textContent.replace(/cokewatch/i, Coke[rand_num]);
}
if (txt.textContent.toLowerCase().indexOf("m2a") != -1) {
rand_num = Math.floor(Math.random() * Moe.length);
txt.textContent = txt.textContent.replace(/m2a/i, Moe[rand_num]);
}
if (txt.textContent.toLowerCase().indexOf("sam") != -1) {
rand_num = Math.floor(Math.random() * Sam.length);
txt.textContent = txt.textContent.replace(/sam/i, Sam[rand_num]);
}
if (txt.textContent.toLowerCase().indexOf("swiftdude") != -1) {
rand_num = Math.floor(Math.random() * Swift.length);
txt.textContent = txt.textContent.replace(/swiftdude/i, Swift[rand_num]);
}
if (txt.textContent.toLowerCase().indexOf("killjoy") != -1) {
rand_num = Math.floor(Math.random() * Killian.length);
txt.textContent = txt.textContent.replace(/killjoy/i, Killian[rand_num]);
}
if (txt.textContent.toLowerCase().indexOf("pope") != -1) {
rand_num = Math.floor(Math.random() * Toy.length);
txt.textContent = txt.textContent.replace(/pope/i, Toy[rand_num]);
}
if (txt.textContent.toLowerCase().indexOf("coeus") != -1) {
rand_num = Math.floor(Math.random() * Coeus.length);
txt.textContent = txt.textContent.replace(/coeus/i, Coeus[rand_num]);
}
if (txt.textContent.toLowerCase().indexOf("king spam ******e") != -1) {
rand_num = Math.floor(Math.random() * Same.length);
txt.textContent = txt.textContent.replace(/king spam ******e/i, Same[rand_num]);
}
}
it.detach();Toxin
it.detach();Czar
it.detach();Obama
it.detach();Coke
it.detach();Sam
it.detach();Moe
it.detach();Swift
it.detach();Coeus
it.detach();Same
All of the arrays:
Code:var Toxin = [];
var Czar = [];
var Obama = [];
var Coke = [];
var Moe = [];
var Sam = [];
var Swift = [];
var Killian = [];
var Toy = [];
var Coeus = [];
var Same = [];
Toxin.push('Toxin');
Czar.push('Czar');
Obama.push('Obama');
Coke.push('Coke');
Moe.push('Moe');
Sam.push('King Spam ******');
Swift.push('Swift');
Killian.push('Killian');
Toy.push('Toy');
Coeus.push('m³');
Same.push('same');
Basic version: (if the extension is enabled, this list will look retarded to you).
Code:Unabomber -> Toxin
Jack Frost -> Czar
Jussofresh -> Obama
Cokewatch -> Coke
M2A -> Moe
Sam -> King Spam ******
Swiftdude -> Swift
Killjoy -> Killian
Pope -> Toy
Coeus -> m³
King Spam ******e -> same (fixes an error)
Oh, it's local. Aww snap. Wouldn't it be better to keep the database online? boh1
Google Chrome will allows this, Safari will not. It requires the scripts to be built into the extension, but there;s probably a work around (using a local JS file to load the remote ones). This would make updating way easier, all I'd have to do is update two files on my server instead of updating four files, building two extensions, editing two update xml files, and uploading everything.
I'm still new to this, so I am probably not doing it too efficiently, but it all works.
I was gonna ask for a chrome version, but thanks.
/fosho This dude deserves +rep.
You forgot me :confused:, my name was Tactical. now it's Fox.
pretty cool, nice one C.
Make an extension for IE.
https://paradoxdgn.com/junk/avatars/trollface.jpg