nephilimNames.js (2197B)
1 var nm1 = ["", "", "", "b", "d", "g", "h", "j", "k", "n", "p", "q", "r", "s", "sh", "t", "th", "z"]; 2 var nm2 = ["a", "e", "a", "e", "a", "e", "a", "e", "a", "e", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "ya", "yu", "ee", "ie", "ue", "ia"]; 3 var nm3 = ["dr", "dj", "gr", "gn", "kb", "kn", "mj", "mr", "mz", "nz", "nq", "rq", "rm", "rj", "rz", "sb", "sz", "st", "tr", "tn", "tz", "b", "d", "g", "j", "k", "m", "n", "q", "r", "s", "t", "z", "b", "d", "g", "j", "k", "m", "n", "q", "r", "s", "t", "z", "b", "d", "g", "j", "k", "m", "n", "q", "r", "s", "t", "z"]; 4 var nm4 = ["l", "n", "s", "th", "z", "l", "l", "", "", "", "", ""]; 5 var br = ""; 6 7 function nameGen() { 8 $('#placeholder').css('textTransform', 'capitalize'); 9 var element = document.createElement("div"); 10 element.setAttribute("id", "result"); 11 for (i = 0; i < 10; i++) { 12 rnd = Math.floor(Math.random() * nm1.length); 13 rnd2 = Math.floor(Math.random() * nm2.length); 14 rnd3 = Math.floor(Math.random() * nm3.length); 15 if (nm1[rnd] === nm3[rnd3]) { 16 rnd3 = Math.floor(Math.random() * nm3.length); 17 } 18 rnd4 = Math.floor(Math.random() * nm2.length); 19 rnd5 = Math.floor(Math.random() * nm4.length); 20 if (i < 4) { 21 names = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm2[rnd4] + nm4[rnd5]; 22 } else { 23 rnd6 = Math.floor(Math.random() * nm3.length); 24 if (rnd3 < 21) { 25 while (rnd6 < 21) { 26 rnd6 = Math.floor(Math.random() * nm3.length); 27 } 28 } 29 rnd7 = Math.floor(Math.random() * nm2.length); 30 names = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm2[rnd4] + nm3[rnd6] + nm2[rnd7] + nm4[rnd5]; 31 } 32 br = document.createElement('br'); 33 element.appendChild(document.createTextNode(names)); 34 element.appendChild(br); 35 } 36 if (document.getElementById("result")) { 37 document.getElementById("placeholder").removeChild(document.getElementById("result")); 38 } 39 document.getElementById("placeholder").appendChild(element); 40 }