pfAnadi.js (4677B)
1 var nm1 = ["", "", "ch", "h", "k", "m", "n", "r", "t", "v", "z"]; 2 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"]; 3 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"]; 4 var nm4 = ["ia", "oa", "ea", "oe", "ee", "aa", "a", "a", "e", "i", "o", "u", "u", "a", "a", "e", "i", "o", "u", "u"]; 5 var nm5 = ["a", "a", "e", "i", "o", "o", "u"]; 6 var nm6 = ["k", "l", "m", "n", "s", "t", "v", "ch", "cht"]; 7 var nm7 = ["", "", "", "", "", "", "", "h", "n"]; 8 var nm10 = ["Strings", "Strings", "Web", "Strands", "Strands", "Webs"]; 9 var nm11 = ["On", "Over", "Across", "Above", "Through", "Between", "Amidst", "Around"]; 10 var nm12 = ["The", "The", "The", "The", "All", "Our"]; 11 var nm13 = ["River", "Mountain", "Forest", "Path", "Lake", "Pond", "Treetops", "Meadow", "Flowers", "Waterfall", "Swamp", "Snow", "Ice", "Frost", "Warmth", "Cloud", "Road", "Park", "Grove", "Field", "Bridge", "Beach"]; 12 var nm14 = ["Flower", "Grass", "Shrub", "Bush", "Tree", "Branch", "Twig", "Brush", "Moss", "Mushroom", "Dew", "Lichen", "Root", "Leaf", "Petal"]; 13 var nm15 = ["Adorned", "Connected", "Focused", "Centered", "Protected", "Enchanted", "Enhanced", "Embellished", "Covered", "Capped", "Painted", "Hidden", "Guarded", "Sheltered"]; 14 var nm16 = ["Family", "Family", "Family", "Anadi", "Parental"]; 15 var nm17 = ["Web", "Strands", "Strings", "Home"]; 16 var nm18 = ["Leaves", "Mosses", "Flowers", "Grasses", "Twigs", "Branches", "Mushrooms", "Fungi", "Lichen", "Roots", "Petals", "Pollen"]; 17 var nm19 = ["Shelter", "Protect", "Adorn", "Embellish", "Guard", "Shield", "Raise", "Teach", "Enchant", "Cover", "Hide", "Paint", "Decorate", "Lift", "Elate", "Inspire", "Embolden", "Sway", "Carry", "Quicken"]; 18 var nm20 = ["Their", "Their", "Their", "Our"]; 19 var nm21 = ["Feet", "Legs", "Bodies", "Eyes", "Home", "Friends", "Children"]; 20 var br = ""; 21 22 function nameGen() { 23 $('#placeholder').css('textTransform', 'capitalize'); 24 var element = document.createElement("div"); 25 element.setAttribute("id", "result"); 26 for (i = 0; i < 10; i++) { 27 nameMas(); 28 while (nMs === "") { 29 nameMas(); 30 } 31 nTp = Math.random() * 3 | 0; 32 if (nTp === 0) { 33 rnd = Math.random() * nm10.length | 0; 34 rnd2 = Math.random() * nm11.length | 0; 35 rnd3 = Math.random() * nm12.length | 0; 36 rnd4 = Math.random() * nm13.length | 0; 37 nMs += ", " + nm10[rnd] + "-" + nm11[rnd2] + "-" + nm12[rnd3] + "-" + nm13[rnd4]; 38 } else if (nTp === 1) { 39 rnd = Math.random() * nm14.length | 0; 40 rnd2 = Math.random() * nm15.length | 0; 41 rnd3 = Math.random() * nm16.length | 0; 42 rnd4 = Math.random() * nm17.length | 0; 43 nMs += ", " + nm14[rnd] + "-" + nm15[rnd2] + "-" + nm16[rnd3] + "-" + nm17[rnd4]; 44 } else { 45 rnd = Math.random() * nm18.length | 0; 46 rnd2 = Math.random() * nm19.length | 0; 47 rnd3 = Math.random() * nm20.length | 0; 48 rnd4 = Math.random() * nm21.length | 0; 49 nMs += ", " + nm18[rnd] + "-" + nm19[rnd2] + "-" + nm20[rnd3] + "-" + nm21[rnd4]; 50 } 51 br = document.createElement('br'); 52 element.appendChild(document.createTextNode(nMs)); 53 element.appendChild(br); 54 } 55 if (document.getElementById("result")) { 56 document.getElementById("placeholder").removeChild(document.getElementById("result")); 57 } 58 document.getElementById("placeholder").appendChild(element); 59 } 60 61 function nameMas() { 62 nTp = Math.random() * 5 | 0; 63 rnd = Math.random() * nm1.length | 0; 64 rnd2 = Math.random() * nm2.length | 0; 65 rnd3 = Math.random() * nm3.length | 0; 66 rnd4 = Math.random() * nm4.length | 0; 67 rnd5 = Math.random() * nm5.length | 0; 68 rnd6 = Math.random() * nm6.length | 0; 69 rnd7 = Math.random() * nm7.length | 0; 70 while (rnd2 < 3 && rnd4 < 4) { 71 rnd4 = Math.random() * nm4.length | 0; 72 } 73 while (nm3[rnd3] === nm1[rnd] || nm3[rnd3] === nm5[rnd5]) { 74 rnd3 = Math.random() * nm3.length | 0; 75 } 76 if (nTp < 4) { 77 nMs = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm4[rnd4] + nm5[rnd5] + nm6[rnd6] + nm7[rnd7]; 78 } else { 79 rnd8 = Math.random() * nm3.length | 0; 80 rnd9 = Math.random() * nm5.length | 0; 81 while (nm3[rnd8] === nm5[rnd5]) { 82 rnd8 = Math.random() * nm3.length | 0; 83 } 84 nMs = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm4[rnd4] + nm5[rnd5] + nm6[rnd6] + nm3[rnd8] + nm5[rnd9] + nm7[rnd7]; 85 } 86 testSwear(nMs); 87 }