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.
59 lines
3.6 KiB
JavaScript
59 lines
3.6 KiB
JavaScript
var nm1 = ["", "", "", "c", "d", "h", "l", "m", "n", "r", "t", "v", "y", "z"];
|
|
var nm2 = ["a", "a", "e", "i", "i", "o", "o", "u"];
|
|
var nm3 = ["b", "br", "h", "l", "lm", "lr", "nk", "r", "rk", "rl", "rr", "s", "ss", "st", "t", "th", "y", "z"];
|
|
var nm4 = ["a", "e", "i", "o", "u"];
|
|
var nm5 = ["h", "l", "ll", "n", "r", "s", "ss", "t", "z"];
|
|
var nm6 = ["ua", "ia", "ei", "a", "a", "e", "e", "i", "i", "o", "u", "a", "a", "e", "e", "i", "i", "o", "u", "a", "a", "e", "e", "i", "i", "o", "u", "a", "a", "e", "e", "i", "i", "o", "u"];
|
|
var nm7 = ["", "", "", "", "", "h", "l", "n", "s", "t", "y", "z"];
|
|
var br = "";
|
|
|
|
function nameGen(type) {
|
|
var nm8 = ["Abaft", "Aft", "Air", "Alluvial", "Anabranch", "Archipelago", "Arroyo", "Astern", "Atmosphere", "Atoll", "Autumn", "Avalanche", "Barchan", "Barrier", "Basin", "Bay", "Bayou", "Beach", "Bearing", "Bight", "Blizzard", "Bluff", "Bornhardt", "Breeze", "Canyon", "Cape", "Cascade", "Cenote", "Chinook", "Cirrus", "Cliff", "Climate", "Cloud", "Course", "Cove", "Crater", "Crevasse", "Cuesta", "Cumulus", "Current", "Cyclone", "Dell", "Delta", "Desert", "Dew", "Dome", "Draft", "Drift", "Drought", "Dune", "Erg", "Estuary", "Fathom", "Fiddle", "Field", "Fjord", "Flood", "Flurry", "Fog", "Forest", "Fork", "Freeze", "Frost", "Gale", "Genoa", "Geo", "Geyser", "Glacier", "Glen", "Gorge", "Graben", "Grove", "Gulf", "Gully", "Gust", "Guyot", "Hail", "Halo", "Halyard", "Harbor", "Haze", "Hill", "Hull", "Hurricane", "Ice", "Island", "Isle", "Islet", "Isthmus", "Jib", "Karst", "Kedge", "Keel", "Ketch", "Knot", "Lagoon", "Lake", "Leeway", "Lightning", "Loch", "Luff", "Marine", "Marsh", "Meadow", "Meander", "Meridian", "Mesa", "Monsoon", "Moraine", "Mountain", "Nunatak", "Oasis", "Ocean", "Peak", "Plain", "Prairie", "RAvine", "Rain", "Rainbow", "Rapids", "Reef", "Reservoir", "Ria", "Ridge", "Riffle", "Rift", "River", "Sea", "Sleet", "Sloop", "Snow", "Source", "Spring", "Sternway", "Storm", "Strait", "Summer", "Terrace", "Thunder", "Tidal", "Tide", "Tributary", "Tsunami", "Typhoon", "Valley", "Vapor", "Veer", "Volcano", "Wake", "Waterfall", "Wind", "Windward", "Winter"];
|
|
var tp = type;
|
|
$('#placeholder').css('textTransform', 'capitalize');
|
|
var element = document.createElement("div");
|
|
element.setAttribute("id", "result");
|
|
for (i = 0; i < 10; i++) {
|
|
if (i < 6) {
|
|
rnd = Math.random() * nm8.length | 0;
|
|
nMs = nm8[rnd];
|
|
nm8.splice(rnd, 1);
|
|
} 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() * nm3.length | 0;
|
|
rnd4 = Math.random() * nm6.length | 0;
|
|
rnd7 = Math.random() * nm7.length | 0;
|
|
while (rnd2 < 5 && rnd4 < 3) {
|
|
rnd2 = Math.random() * nm2.length | 0;
|
|
}
|
|
if (nTp < 4) {
|
|
nMs = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm6[rnd4] + nm7[rnd7];
|
|
} else {
|
|
rnd5 = Math.random() * nm5.length | 0;
|
|
rnd6 = Math.random() * nm4.length | 0;
|
|
while (rnd6 < 3 && rnd4 < 3) {
|
|
rnd4 = Math.random() * nm6.length | 0;
|
|
}
|
|
nMs = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm6[rnd4] + nm5[rnd5] + nm6[rnd4] + nm7[rnd7];
|
|
}
|
|
testSwear(nMs);
|
|
}
|