languageNames.js (4820B)
1 var nm1 = ["b", "c", "d", "f", "g", "h", "j", "k", "l", "m", "n", "p", "q", "r", "s", "t", "v", "w", "x", "y", "z", "b", "c", "d", "f", "g", "h", "j", "k", "l", "m", "n", "p", "q", "r", "s", "t", "v", "w", "x", "y", "z", "b", "c", "d", "f", "g", "h", "j", "k", "l", "m", "n", "p", "q", "r", "s", "t", "v", "w", "x", "y", "z", "bh", "bl", "br", "ch", "cl", "cr", "cy", "dh", "dr", "fh", "fl", "fr", "gh", "gn", "gl", "gr", "kh", "kl", "kn", "kr", "mh", "my", "nh", "ph", "pl", "pr", "pn", "rh", "sc", "sh", "sl", "sm", "sn", "sp", "sr", "st", "str", "th", "tr", "ty", "vh", "wh", "zh", ]; 2 var nm2 = ["a", "e", "o", "i", "u", "a", "e", "o", "i", "u", "a", "e", "o", "i", "u", "a", "e", "o", "i", "u", "ae", "ao", "ai", "au", "ea", "eo", "ei", "eu", "oa", "oe", "oi", "ou", "ia", "ie", "io", "iu", "ua", "ue", "uo", "ui", "aa", "ee", "oo", "uu"]; 3 var nm3 = ["b", "c", "d", "f", "g", "j", "k", "l", "m", "n", "p", "q", "r", "s", "t", "v", "w", "x", "y", "z", "b", "c", "d", "f", "g", "j", "k", "l", "m", "n", "p", "q", "r", "s", "t", "v", "w", "x", "y", "z", "b", "c", "d", "f", "g", "j", "k", "l", "m", "n", "p", "q", "r", "s", "t", "v", "w", "x", "y", "z", "b", "c", "d", "f", "g", "j", "k", "l", "m", "n", "p", "q", "r", "s", "t", "v", "w", "x", "y", "z", "bb", "cc", "dd", "ff", "gg", "kk", "ll", "mm", "nn", "pp", "rr", "ss", "tt", "ww", "zz", "cb", "lb", "nb", "bd", "zb", "cd", "gd", "ld", "md", "nd", "sd", "rd", "zd", "lf", "mf", "nf", "sf", "tf", "lg", "mg", "ng", "rg", "sg", "zg", "yg", "ck", "lk", "mk", "str", "nk", "sk", "tk", "zk", "fl", "gl", "kl", "pl", "sl", "tl", "dm", "fm", "gm", "km", "lm", "nm", "sm", "tm", "xm", "zm", "yn", "dn", "fn", "gn", "kn", "mn", "pn", "sn", "tn", "xn", "zn", "np", "sp", "tp", "xp", "fr", "gr", "kr", "pr", "tr", "gs", "ks", "ls", "ms", "ns", "ps", "ts", "xs", "ct", "kt", "lt", "mt", "nt", "pt", "rt", "st", "xt", "yt"]; 4 var nm4 = ["abi", "ada", "ali", "an", "esh", "ash", "ani", "ano", "arhi", "ari", "aric", "arin", "asy", "athi", "ati", "ean", "ekhi", "eno", "eesh", "ese", "esh", "ethi", "eti", "ian", "ic", "ili", "in", "ina", "ish", "iya", "oshi", "oni", "osa", "uin", "un", "uni", "uri"]; 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 if (i < 3) { 13 rnd = Math.floor(Math.random() * nm1.length); 14 rnd2 = Math.floor(Math.random() * nm2.length); 15 rnd3 = Math.floor(Math.random() * nm3.length); 16 rnd4 = Math.floor(Math.random() * nm4.length); 17 name = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm4[rnd4]; 18 } else if (i < 6) { 19 rnd2 = Math.floor(Math.random() * nm2.length); 20 rnd3 = Math.floor(Math.random() * nm3.length); 21 rnd4 = Math.floor(Math.random() * nm4.length); 22 name = nm2[rnd2] + nm3[rnd3] + nm4[rnd4]; 23 } else if (i < 8) { 24 rnd = Math.floor(Math.random() * nm1.length); 25 rnd2 = Math.floor(Math.random() * nm2.length); 26 rnd3 = Math.floor(Math.random() * nm3.length); 27 rnd4 = Math.floor(Math.random() * nm2.length); 28 if (rnd2 > 19) { 29 while (rnd4 > 19) { 30 rnd4 = Math.floor(Math.random() * nm2.length); 31 } 32 } 33 rnd5 = Math.floor(Math.random() * nm3.length); 34 if (rnd3 > 80) { 35 while (rnd5 > 80) { 36 rnd5 = Math.floor(Math.random() * nm3.length); 37 } 38 } 39 rnd6 = Math.floor(Math.random() * nm4.length); 40 name = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm2[rnd4] + nm3[rnd5] + nm4[rnd6]; 41 } else { 42 rnd2 = Math.floor(Math.random() * nm2.length); 43 rnd3 = Math.floor(Math.random() * nm3.length); 44 rnd4 = Math.floor(Math.random() * nm2.length); 45 if (rnd2 > 19) { 46 while (rnd4 > 19) { 47 rnd4 = Math.floor(Math.random() * nm2.length); 48 } 49 } 50 rnd5 = Math.floor(Math.random() * nm3.length); 51 if (rnd3 > 80) { 52 while (rnd5 > 80) { 53 rnd5 = Math.floor(Math.random() * nm3.length); 54 } 55 } 56 rnd6 = Math.floor(Math.random() * nm4.length); 57 name = nm2[rnd2] + nm3[rnd3] + nm2[rnd4] + nm3[rnd5] + nm4[rnd6]; 58 } 59 br = document.createElement('br'); 60 element.appendChild(document.createTextNode(name)); 61 element.appendChild(br); 62 } 63 if (document.getElementById("result")) { 64 document.getElementById("placeholder").removeChild(document.getElementById("result")); 65 } 66 document.getElementById("placeholder").appendChild(element); 67 }