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.
100 lines
4.4 KiB
JavaScript
100 lines
4.4 KiB
JavaScript
var nm1 = ["", "", "", "", "g", "h", "j", "k", "kl", "kr", "kz", "l", "m", "n", "p", "q", "r", "s", "sh", "sk", "sr", "t", "tz", "v", "x", "z"];
|
|
var nm2 = ["a", "e", "i", "a", "i", "a", "i", "o", "u"];
|
|
var nm3 = ["'d", "'h", "'j", "'k", "'m", "'r", "'t", "'th", "'v", "'y", "'z", "k'", "k't", "k'th", "k'v", "kz", "l", "l'j", "l'k", "l'l", "l'r", "l't", "l'th", "l'v", "l'z", "lth", "n", "n'b", "n's", "p't", "r", "r'", "r'l", "r'r", "rv", "s", "t'", "t'k", "t't", "th", "th'", "vv", "x'", "x't", "yy", "z'r", "z't", "zz"];
|
|
var nm4 = ["k", "kk", "l", "n", "r", "rr", "s", "th", "v", "x", "xx", "z", "zz"];
|
|
var nm5 = ["", "", "", "", "", "k", "k", "k", "k", "k", "l", "m", "n", "r", "s", "t", "th", "x", "z"];
|
|
var nm6 = ["", "", "", "", "c", "h", "j", "l", "m", "n", "q", "r", "s", "sh", "t", "th", "v", "x", "z", "zh"];
|
|
var nm7 = ["a", "e", "a", "e", "a", "e", "i", "o"];
|
|
var nm8 = ["'h", "'th", "'y", "'z", "k'", "k'h", "k'th", "k'v", "k'z", "l", "l'k", "l'h", "l'th", "l'v", "l'z", "lth", "n", "n'z", "n'h", "r", "r'", "r'h", "r'z", "r'v", "r'th", "s", "sh", "s'", "sh'", "s'h", "sh'r", "sh'v", "t", "t'", "th", "th'", "t'h", "t'z", "th'v", "th'r", "v", "v'", "v'h", "x'"];
|
|
var nm9 = ["a", "a", "a", "a", "e", "e", "e", "e", "i", "i", "ee", "ie"];
|
|
var nm10 = ["l", "ll", "r", "rr", "n", "nn", "s", "ss", "sh", "t", "th", "z", "zz"];
|
|
var nm11 = ["", "", "", "", "", "l", "r", "s", "sh", "t", "th", "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++) {
|
|
if (tp === 1) {
|
|
nameFem();
|
|
while (nMs === "") {
|
|
nameFem();
|
|
}
|
|
} else {
|
|
nameMas();
|
|
while (nMs === "") {
|
|
nameMas();
|
|
}
|
|
}
|
|
br = document.createElement('br');
|
|
element.appendChild(document.createTextNode(nMs));
|
|
element.appendChild(br);
|
|
}
|
|
if (document.getElementById("result")) {
|
|
document.getElementById("placeholder").removeChild(document.getElementById("result"));
|
|
}
|
|
document.getElementById("placeholder").appendChild(element);
|
|
}
|
|
|
|
function nameMas() {
|
|
nTp = Math.random() * 6 | 0;
|
|
rnd = Math.random() * nm1.length | 0;
|
|
rnd2 = Math.random() * nm2.length | 0;
|
|
rnd3 = Math.random() * nm5.length | 0;
|
|
if (nTp === 0) {
|
|
while (nm1[rnd] === nm5[rnd3]) {
|
|
rnd3 = Math.random() * nm5.length | 0;
|
|
}
|
|
nMs = nm1[rnd] + nm2[rnd2] + nm5[rnd3];
|
|
} else {
|
|
rnd5 = Math.random() * nm2.length | 0;
|
|
if (nTp < 3) {
|
|
rnd4 = Math.random() * nm3.length | 0;
|
|
while (nm3[rnd4] === nm1[rnd] || nm3[rnd4] === nm5[rnd3]) {
|
|
rnd4 = Math.random() * nm3.length | 0;
|
|
}
|
|
nMs = nm1[rnd] + nm2[rnd2] + nm3[rnd4] + nm2[rnd5] + nm5[rnd3];
|
|
} else {
|
|
rnd6 = Math.random() * nm4.length | 0;
|
|
rnd7 = Math.random() * nm2.length | 0;
|
|
if (nTp === 3) {
|
|
rnd4 = Math.random() * nm3.length | 0;
|
|
nMs = nm1[rnd] + nm2[rnd2] + nm3[rnd4] + nm2[rnd5] + nm4[rnd6] + nm2[rnd7] + nm5[rnd3];
|
|
} else if (nTp === 4) {
|
|
rnd4 = Math.random() * nm3.length | 0;
|
|
nMs = nm1[rnd] + nm2[rnd2] + nm4[rnd6] + nm2[rnd7] + nm3[rnd4] + nm2[rnd5] + nm5[rnd3];
|
|
} else {
|
|
rnd4 = Math.random() * nm4.length | 0;
|
|
nMs = nm1[rnd] + nm2[rnd2] + nm4[rnd4] + nm2[rnd5] + nm4[rnd6] + nm2[rnd7] + nm5[rnd3];
|
|
}
|
|
}
|
|
}
|
|
testSwear(nMs);
|
|
}
|
|
|
|
function nameFem() {
|
|
nTp = Math.random() * 4 | 0;
|
|
rnd = Math.random() * nm6.length | 0;
|
|
rnd2 = Math.random() * nm7.length | 0;
|
|
rnd3 = Math.random() * nm8.length | 0;
|
|
rnd4 = Math.random() * nm9.length | 0;
|
|
rnd5 = Math.random() * nm11.length | 0;
|
|
while (nm8[rnd3] === nm6[rnd] || nm8[rnd3] === nm11[rnd5]) {
|
|
rnd3 = Math.random() * nm8.length | 0;
|
|
}
|
|
if (nTp < 2) {
|
|
nMs = nm6[rnd] + nm7[rnd2] + nm8[rnd3] + nm9[rnd4] + nm11[rnd5];
|
|
} else {
|
|
rnd6 = Math.random() * nm10.length | 0;
|
|
rnd7 = Math.random() * nm9.length | 0;
|
|
if (nTp === 2) {
|
|
nMs = nm6[rnd] + nm7[rnd2] + nm8[rnd3] + nm9[rnd4] + nm10[rnd6] + nm9[rnd7] + nm11[rnd5];
|
|
} else {
|
|
nMs = nm6[rnd] + nm7[rnd2] + nm10[rnd6] + nm9[rnd7] + nm8[rnd3] + nm9[rnd4] + nm11[rnd5];
|
|
}
|
|
}
|
|
testSwear(nMs);
|
|
}
|