You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
78 lines
4.1 KiB
JavaScript
78 lines
4.1 KiB
JavaScript
var nm1 = ["b", "h", "l", "m", "n", "p", "r", "t"];
|
|
var nm2 = ["ee", "ie", "ei", "ai", "i", "o", "u", "i", "o", "u", "a", "e", "i", "o", "u", "i", "o", "u", "a", "e"];
|
|
var nm3 = ["h", "l", "n", "r", "t", "v", "z"];
|
|
var nm4 = ["a", "e", "i", "o", "u", "i"];
|
|
var nm5 = ["d", "k", "kk", "l", "ld", "lf", "lk", "nq", "nt", "rd", "rk", "rq", "s", "sk", "sq", "ss", "st", "x", "z", "zz"];
|
|
var nm6 = ["k", "q", "d", "p", "r", "t", "v", "z"];
|
|
var nm7 = ["Aloof", "Ambiguous", "Ambitious", "Antsy", "Anxious", "Avaricious", "Barbarous", "Bashful", "Blissful", "Bohemian", "Bountiful", "Breezy", "Bubbly", "Buccaneer", "Callous", "Canine", "Capricious", "Careless", "Cheery", "Clueless", "Clumsy", "Conscious", "Corsair", "Crabby", "Craven", "Curious", "Delirious", "Dizzy", "Dopey", "Draconian", "Drifter", "Droopy", "Dusty", "Envious", "Fabulous", "Fallacious", "Fanatical", "Fearless", "Finicky", "Flaky", "Flimsy", "Foolish", "Frizzy", "Garrulous", "Glamorous", "Greasy", "Gregarious", "Grizzly", "Grotesque", "Grumpy", "Harmless", "Hideous", "Hilarious", "Humorous", "Icky", "Impish", "Insidious", "Itchy", "Joyous", "Jubilant", "Juvenile", "Knave", "Kooky", "Lucky", "Ludicrous", "Mad", "Malicious", "Maverick", "Measly", "Merry", "Monstrous", "Nervous", "Nimble", "Noxious", "Oafish", "Oblivious", "Obnoxious", "Outrageous", "Paltry", "Petty", "Pompous", "Precious", "Prickly", "Puny", "Rambunctious", "Rascal", "Ratty", "Reckless", "Rifler", "Ritzy", "Rogue", "Rover", "Rowdy", "Rusty", "Scandalous", "Scoundrel", "Scrawny", "Shady", "Silent", "Sleepy", "Slimy", "Sloppy", "Squiggly", "Suspicious", "Swindler", "Tedious", "Teeny", "Tenuous", "Thrifty", "Trusty", "Uppity", "Vagabond", "Vagrant", "Vapid", "Vicious", "Vivid", "Volatile", "Voracious", "Wiggly", "Wobbly", "Wretched", "Zealous"];
|
|
var nm8 = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "z"];
|
|
var br = "";
|
|
|
|
function nameGen(type) {
|
|
var tp = type;
|
|
$('#placeholder').css('textTransform', 'capitalize');
|
|
var element = document.createElement("div");
|
|
element.setAttribute("id", "result");
|
|
for (i = 0; i < 10; i++) {
|
|
nL = Math.random() * 5 | 0;
|
|
nameMas();
|
|
while (nMs === "") {
|
|
nameMas();
|
|
}
|
|
names = nMs;
|
|
if (nL < 3) {
|
|
if (names.length > 3) {
|
|
nameMas();
|
|
while (nMs === "") {
|
|
nameMas();
|
|
}
|
|
if (nMs.length === 3) {
|
|
names += " " + nMs + nMs;
|
|
} else {
|
|
names += " " + nMs;
|
|
}
|
|
} else {
|
|
names += names;
|
|
}
|
|
} else {
|
|
rnd = Math.random() * nm7.length | 0;
|
|
rnd2 = Math.random() * nm8.length | 0;
|
|
names = nm7[rnd] + " " + nm8[rnd2] + ". " + names;
|
|
}
|
|
br = document.createElement('br');
|
|
element.appendChild(document.createTextNode(names));
|
|
element.appendChild(br);
|
|
}
|
|
if (document.getElementById("result")) {
|
|
document.getElementById("placeholder").removeChild(document.getElementById("result"));
|
|
}
|
|
document.getElementById("placeholder").appendChild(element);
|
|
}
|
|
|
|
function nameMas() {
|
|
nTp = Math.random() * 10 | 0;
|
|
rnd = Math.random() * nm1.length | 0;
|
|
rnd2 = Math.random() * nm2.length | 0;
|
|
if (nTp < 3) {
|
|
rnd3 = Math.random() * nm6.length | 0;
|
|
while (nm1[rnd] === nm6[rnd3]) {
|
|
rnd3 = Math.random() * nm6.length | 0;
|
|
}
|
|
nMs = nm1[rnd] + nm2[rnd2] + nm6[rnd3];
|
|
} else if (nTp < 6) {
|
|
rnd3 = Math.random() * nm5.length | 0;
|
|
while (nm1[rnd] === nm5[rnd3]) {
|
|
rnd3 = Math.random() * nm5.length | 0;
|
|
}
|
|
nMs = nm1[rnd] + nm2[rnd2] + nm5[rnd3];
|
|
} else {
|
|
rnd4 = Math.random() * nm3.length | 0;
|
|
rnd5 = Math.random() * nm4.length | 0;
|
|
while (nm3[rnd4] === nm1[rnd] || nm3[rnd4] === nm7[rnd3]) {
|
|
rnd4 = Math.random() * nm3.length | 0;
|
|
}
|
|
nMs = nm1[rnd] + nm2[rnd2] + nm3[rnd4] + nm4[rnd5];
|
|
}
|
|
testSwear(nMs);
|
|
}
|