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.
88 lines
4.6 KiB
JavaScript
88 lines
4.6 KiB
JavaScript
var nm1 = ["", "", "ch", "h", "k", "m", "n", "r", "t", "v", "z"];
|
|
var nm2 = ["aia", "eia", "aio", "a", "e", "i", "o", "a", "e", "i", "o", "a", "e", "i", "o", "a", "e", "i", "o", "a", "e", "i", "o"];
|
|
var nm3 = ["k", "l", "m", "n", "r", "t", "v", "k", "l", "m", "n", "r", "t", "v", "ch", "lk", "ln", "lt", "nk", "rk", "rv", "shk", "tch", "zk", "zr"];
|
|
var nm4 = ["ia", "oa", "ea", "oe", "ee", "aa", "a", "a", "e", "i", "o", "u", "u", "a", "a", "e", "i", "o", "u", "u"];
|
|
var nm5 = ["a", "a", "e", "i", "o", "o", "u"];
|
|
var nm6 = ["k", "l", "m", "n", "s", "t", "v", "ch", "cht"];
|
|
var nm7 = ["", "", "", "", "", "", "", "h", "n"];
|
|
var nm10 = ["Strings", "Strings", "Web", "Strands", "Strands", "Webs"];
|
|
var nm11 = ["On", "Over", "Across", "Above", "Through", "Between", "Amidst", "Around"];
|
|
var nm12 = ["The", "The", "The", "The", "All", "Our"];
|
|
var nm13 = ["River", "Mountain", "Forest", "Path", "Lake", "Pond", "Treetops", "Meadow", "Flowers", "Waterfall", "Swamp", "Snow", "Ice", "Frost", "Warmth", "Cloud", "Road", "Park", "Grove", "Field", "Bridge", "Beach"];
|
|
var nm14 = ["Flower", "Grass", "Shrub", "Bush", "Tree", "Branch", "Twig", "Brush", "Moss", "Mushroom", "Dew", "Lichen", "Root", "Leaf", "Petal"];
|
|
var nm15 = ["Adorned", "Connected", "Focused", "Centered", "Protected", "Enchanted", "Enhanced", "Embellished", "Covered", "Capped", "Painted", "Hidden", "Guarded", "Sheltered"];
|
|
var nm16 = ["Family", "Family", "Family", "Anadi", "Parental"];
|
|
var nm17 = ["Web", "Strands", "Strings", "Home"];
|
|
var nm18 = ["Leaves", "Mosses", "Flowers", "Grasses", "Twigs", "Branches", "Mushrooms", "Fungi", "Lichen", "Roots", "Petals", "Pollen"];
|
|
var nm19 = ["Shelter", "Protect", "Adorn", "Embellish", "Guard", "Shield", "Raise", "Teach", "Enchant", "Cover", "Hide", "Paint", "Decorate", "Lift", "Elate", "Inspire", "Embolden", "Sway", "Carry", "Quicken"];
|
|
var nm20 = ["Their", "Their", "Their", "Our"];
|
|
var nm21 = ["Feet", "Legs", "Bodies", "Eyes", "Home", "Friends", "Children"];
|
|
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();
|
|
}
|
|
nTp = Math.random() * 3 | 0;
|
|
if (nTp === 0) {
|
|
rnd = Math.random() * nm10.length | 0;
|
|
rnd2 = Math.random() * nm11.length | 0;
|
|
rnd3 = Math.random() * nm12.length | 0;
|
|
rnd4 = Math.random() * nm13.length | 0;
|
|
nMs += ", " + nm10[rnd] + "-" + nm11[rnd2] + "-" + nm12[rnd3] + "-" + nm13[rnd4];
|
|
} else if (nTp === 1) {
|
|
rnd = Math.random() * nm14.length | 0;
|
|
rnd2 = Math.random() * nm15.length | 0;
|
|
rnd3 = Math.random() * nm16.length | 0;
|
|
rnd4 = Math.random() * nm17.length | 0;
|
|
nMs += ", " + nm14[rnd] + "-" + nm15[rnd2] + "-" + nm16[rnd3] + "-" + nm17[rnd4];
|
|
} else {
|
|
rnd = Math.random() * nm18.length | 0;
|
|
rnd2 = Math.random() * nm19.length | 0;
|
|
rnd3 = Math.random() * nm20.length | 0;
|
|
rnd4 = Math.random() * nm21.length | 0;
|
|
nMs += ", " + nm18[rnd] + "-" + nm19[rnd2] + "-" + nm20[rnd3] + "-" + nm21[rnd4];
|
|
}
|
|
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() * nm3.length | 0;
|
|
rnd4 = Math.random() * nm4.length | 0;
|
|
rnd5 = Math.random() * nm5.length | 0;
|
|
rnd6 = Math.random() * nm6.length | 0;
|
|
rnd7 = Math.random() * nm7.length | 0;
|
|
while (rnd2 < 3 && rnd4 < 4) {
|
|
rnd4 = Math.random() * nm4.length | 0;
|
|
}
|
|
while (nm3[rnd3] === nm1[rnd] || nm3[rnd3] === nm5[rnd5]) {
|
|
rnd3 = Math.random() * nm3.length | 0;
|
|
}
|
|
if (nTp < 4) {
|
|
nMs = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm4[rnd4] + nm5[rnd5] + nm6[rnd6] + nm7[rnd7];
|
|
} else {
|
|
rnd8 = Math.random() * nm3.length | 0;
|
|
rnd9 = Math.random() * nm5.length | 0;
|
|
while (nm3[rnd8] === nm5[rnd5]) {
|
|
rnd8 = Math.random() * nm3.length | 0;
|
|
}
|
|
nMs = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm4[rnd4] + nm5[rnd5] + nm6[rnd6] + nm3[rnd8] + nm5[rnd9] + nm7[rnd7];
|
|
}
|
|
testSwear(nMs);
|
|
}
|