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.
56 lines
3.1 KiB
JavaScript
56 lines
3.1 KiB
JavaScript
var nm1 = ["b", "d", "k", "p", "r", "s", "t", "th", "z"];
|
|
var nm2 = ["a", "e", "i", "o", "u"];
|
|
var nm3 = ["", "", "", "", "d", "dh", "dr", "ld", "ldr", "lfr", "mm", "mn", "mpl", "ndr", "r", "rr", "rc", "rl", "rn", "rs", "v", "z", "zr"];
|
|
var nm4 = ["a", "a", "e", "i", "i", "o", "u"];
|
|
var nm5 = ["b", "fr", "p", "r", "v", "w", "z"];
|
|
var nm6 = ["a", "e", "i"];
|
|
var nm7 = ["ck", "d", "k", "l", "ld", "lt", "n", "nt", "r", "rd", "s"];
|
|
var nm8 = ["Achen", "Adel", "Alter", "Ammer", "Aschen", "Auer", "Augen", "Bam", "Bauern", "Baum", "Bern", "Birn", "Bitter", "Blumen", "Brand", "Ehren", "Eichen", "Eisen", "Eulen", "Feigen", "Feuer", "Flei", "Freuden", "Fried", "Gold", "Gott", "Gross", "Grun", "Guten", "Haber", "Hage", "Hart", "Hassel", "Hatten", "Haven", "Heid", "Hein", "Heit", "Herz", "Hilde", "Himmel", "Hoch", "Hoenig", "Hof", "Holder", "Honigs", "Horn", "Junker", "Katzen", "Klein", "Kloster", "Kohl", "Korn", "Kreutz", "Kronen", "Krucken", "Lands", "Lehm", "Lem", "Lichten", "Mengel", "Mitter", "Molden", "Nadel", "Neu", "Nieder", "Pfeffer", "Ratzen", "Reichen", "Rein", "Roden", "Rohr", "Rosen", "Roth", "Rott", "Sauer", "Scheide", "Schild", "Schon", "Schul", "Schutzen", "Schwarz", "Seel", "Spiegel", "Stein", "Stern", "Stock", "Stras", "Strom", "Thal", "Uffer", "Unter", "Wald", "Wasser", "Weide", "Wein", "Weiss"];
|
|
var nm9 = ["bach", "bauer", "beck", "berg", "berger", "blum", "burg", "dorf", "feld", "fried", "hal", "hardt", "hauer", "haus", "heim", "hoff", "hold", "holdt", "holt", "holz", "horn", "lich", "mann", "mayer", "meister", "schmidt", "stein", "told", "wald"];
|
|
var br = "";
|
|
|
|
function nameGen() {
|
|
$('#placeholder').css('textTransform', 'capitalize');
|
|
var element = document.createElement("div");
|
|
element.setAttribute("id", "result");
|
|
for (i = 0; i < 10; i++) {
|
|
nameMas();
|
|
while (nMs === "") {
|
|
nameMas();
|
|
}
|
|
rnd = Math.random() * nm8.length | 0;
|
|
rnd2 = Math.random() * nm9.length | 0;
|
|
nMs = nMs + " " + nm8[rnd] + nm9[rnd2];
|
|
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() * 5 | 0;
|
|
rnd = Math.random() * nm1.length | 0;
|
|
rnd2 = Math.random() * nm2.length | 0;
|
|
rnd3 = Math.random() * nm7.length | 0;
|
|
rnd4 = Math.random() * nm3.length | 0;
|
|
rnd5 = Math.random() * nm6.length | 0;
|
|
while (nm3[rnd4] === nm1[rnd] && nm3[rnd4] === nm7[rnd3]) {
|
|
rnd4 = Math.random() * nm3.length | 0;
|
|
}
|
|
if (nTp < 4) {
|
|
nMs = nm1[rnd] + nm2[rnd2] + nm3[rnd4] + nm6[rnd5] + nm7[rnd3];
|
|
} else {
|
|
rnd6 = Math.random() * nm5.length | 0;
|
|
rnd7 = Math.random() * nm4.length | 0;
|
|
while (nm3[rnd4] === nm5[rnd6] || nm5[rnd6] === nm7[rnd3]) {
|
|
rnd6 = Math.random() * nm5.length | 0;
|
|
}
|
|
nMs = nm1[rnd] + nm2[rnd2] + nm3[rnd4] + nm4[rnd7] + nm5[rnd6] + nm6[rnd5] + nm7[rnd3];
|
|
}
|
|
testSwear(nMs);
|
|
}
|