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.

60 lines
3.7 KiB
JavaScript

var nm1 = ["B", "Bl", "Br", "D", "Dr", "Gr", "G", "Gl", "J", "K", "Kr", "L", "S", "Sr", "Sl", "Tr", "Tl"];
var nm2 = ["a", "e", "i", "o", "u", "ee", "oo", "aa"];
var nm3 = ["cra", "ckt", "ckto", "f", "ft", "ll", "lm", "ln", "m", "n", "ne", "p", "rm", "rn", "rs", "rst", "st", "s", "ss", "sp", "x", "xa"];
var nm4 = ["B", "D", "F", "G", "K", "L", "M", "N", "R", "T", "V"];
var nm5 = ["a", "e", "i", "o", "u", "y"];
var nm6 = ["d", "f", "g", "gg", "l", "ll", "m", "mm", "ng", "nn", "r", "rr", "rm", "rn", "s", "ss", "x", "ze", "z"];
var nm7 = ["B", "Bl", "D", "Dr", "F", "Fl", "G", "Gr", "Gl", "Kl", "L", "M", "N", "T"];
var nm8 = ["bs", "dd", "gg", "gs", "ln", "lm", "ls", "n", "ng", "rn", "rm", "rt", "tch", "sh", "ze"];
var nm9 = ["B", "D", "G", "H", "K", "L", "M", "N", "P", "R", "S", "Sh"];
var nm10 = ["a", "e", "i", "o", "u"];
var nm11 = ["bb", "bl", "gl", "gr", "gg", "kr", "kl", "kk", "lm", "ln", "lr", "ll", "pp", "pr", "pl", "rr", "rl", "ss", "t", "tl"];
var nm12 = ["d", "l", "m", "n", "s", "v"];
var nm13 = ["eer", "en", "een"];
var nm14 = ["B", "Bl", "D", "G", "Gl", "Gr", "Pl", "P", "Pr", "R", "S", "Sl", "T", "Tr"];
var nm15 = ["f", "l", "m", "n", "r", "s", "y"];
var nm16 = ["B", "Bl", "C", "Ch", "F", "Fl", "Gl", "G", "H", "K", "L", "M", "N", "P", "R", "Sl", "S"];
var nm17 = ["ck", "dr", "ff", "g", "gr", "kk", "l", "ll", "m", "n", "pp", "rl", "st", "str", "tt", "th", "v", "z"];
var nm18 = ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "ar", "er", "et", "ez", "at", "az", "oz", "el", "al", "es", "as"];
var nm19 = ["een", "ene"];
function nameGen() {
$('#placeholder').css('textTransform', 'capitalize');
var br = "";
var element = document.createElement("div");
element.setAttribute("id", "result");
for (i = 0; i < 10; i++) {
rnd = Math.floor(Math.random() * nm1.length);
rnd2 = Math.floor(Math.random() * nm2.length);
rnd3 = Math.floor(Math.random() * nm3.length);
rnd4 = Math.floor(Math.random() * nm4.length);
rnd5 = Math.floor(Math.random() * nm5.length);
rnd6 = Math.floor(Math.random() * nm6.length);
rnd7 = Math.floor(Math.random() * nm7.length);
rnd8 = Math.floor(Math.random() * nm10.length);
rnd9 = Math.floor(Math.random() * nm8.length);
rnd10 = Math.floor(Math.random() * nm9.length);
rnd11 = Math.floor(Math.random() * nm10.length);
rnd12 = Math.floor(Math.random() * nm11.length);
rnd13 = Math.floor(Math.random() * nm10.length);
rnd14 = Math.floor(Math.random() * nm12.length);
rnd15 = Math.floor(Math.random() * nm13.length);
rnd16 = Math.floor(Math.random() * nm14.length);
rnd17 = Math.floor(Math.random() * nm10.length);
rnd18 = Math.floor(Math.random() * nm15.length);
rnd19 = Math.floor(Math.random() * nm16.length);
rnd20 = Math.floor(Math.random() * nm10.length);
rnd21 = Math.floor(Math.random() * nm17.length);
rnd22 = Math.floor(Math.random() * nm18.length);
rnd23 = Math.floor(Math.random() * nm19.length);
names = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + " " + nm4[rnd4] + nm5[rnd5] + nm6[rnd6] + " " + nm7[rnd7] + nm10[rnd8] + nm8[rnd9] + " " + nm9[rnd10] + nm10[rnd11] + nm11[rnd12] + nm10[rnd13] + nm12[rnd14] + nm13[rnd15] + "-" + nm14[rnd16] + nm10[rnd17] + nm15[rnd18] + " " + nm16[rnd19] + nm10[rnd20] + nm17[rnd21] + nm18[rnd22] + nm19[rnd23];
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);
}