swNautolanNames.js (6167B)
1 var nm1 = ["", "", "", "", "", "b", "br", "c", "d", "f", "h", "j", "k", "kh", "kn", "l", "m", "n", "p", "r", "rh", "rr", "s", "sh", "shr", "t", "v", "w", "y", "z"]; 2 var nm2 = ["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", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "oo", "ey", "ei", "ea", "ee", "aa"]; 3 var nm3 = ["ch", "d", "dd", "f", "fr", "k", "kt", "kx", "l", "m", "mr", "md", "mt", "n", "nd", "ng", "nn", "nt", "ntv", "nr", "ny", "pr", "r", "rk", "rr", "s", "shn", "sn", "sp", "spr", "th", "tr", "tv", "v", "w", "x", "z"]; 4 var nm4 = ["", "", "", "", "", "c", "d", "f", "g", "k", "l", "m", "n", "ng", "nn", "r", "rr", "s", "t", "x"]; 5 var nm5 = ["", "", "", "", "", "", "", "d", "dr", "dh", "f", "fr", "g", "gh", "h", "k", "kh", "l", "m", "n", "p", "r", "rh", "s", "sh", "th", "w", "y", "z"]; 6 var nm6 = ["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", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "y", "y", "ea", "ee", "ai", "ie", "ia", "oo"]; 7 var nm7 = ["b", "c", "ch", "f", "ff", "h", "hl", "l", "ll", "lm", "ln", "lr", "m", "ml", "mm", "my", "n", "nn", "nl", "nd", "ny", "r", "rr", "s", "ss", "sh", "shn", "t", "th", "w", "y"]; 8 var nm8 = ["", "", "", "", "", "", "", "f", "h", "l", "n", "s", "t"]; 9 var nm9 = ["", "", "", "b", "br", "d", "dr", "f", "g", "k", "l", "m", "n", "r", "rh", "s", "st", "t", "tr", "v", "vr", "z"]; 10 var nm10 = ["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", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "oa", "ai", "ia", "ii", "ie", "ee", "oo"]; 11 var nm11 = ["ch", "chm", "d", "dd", "dr", "dj", "g", "gg", "gr", "gd", "gn", "j", "k", "kt", "kk", "l", "m", "mm", "md", "mp", "n", "nd", "nn", "ng", "nr", "nt", "r", "rr", "rd", "rg", "rj", "rt", "rv", "st", "t", "tr", "wch", "z"]; 12 var nm12 = ["", "", "", "", "", "", "", "c", "d", "g", "k", "l", "ll", "m", "mt", "n", "ng", "nd", "nt", "r", "rk", "rr", "s", "ss", "t", "ts", "z", "zz"]; 13 var br = ""; 14 15 function nameGen(type) { 16 var tp = type; 17 $('#placeholder').css('textTransform', 'capitalize'); 18 var element = document.createElement("div"); 19 element.setAttribute("id", "result"); 20 for (i = 0; i < 10; i++) { 21 rnd7 = Math.floor(Math.random() * nm9.length); 22 rnd8 = Math.floor(Math.random() * nm10.length); 23 rnd10 = Math.floor(Math.random() * nm12.length); 24 if (i % 3 === 0 && i % 2 != 0) { 25 while (rnd7 < 3) { 26 rnd7 = Math.floor(Math.random() * nm9.length); 27 } 28 namelast = nm9[rnd7] + nm10[rnd8] + nm12[rnd10]; 29 } else if (i % 2 === 0) { 30 rnd9 = Math.floor(Math.random() * nm10.length); 31 rnd11 = Math.floor(Math.random() * nm11.length); 32 namelast = nm9[rnd7] + nm10[rnd8] + nm11[rnd11] + nm10[rnd9] + nm12[rnd10]; 33 } else { 34 rnd9 = Math.floor(Math.random() * nm10.length); 35 rnd11 = Math.floor(Math.random() * nm11.length); 36 rnd12 = Math.floor(Math.random() * nm10.length); 37 rnd13 = Math.floor(Math.random() * nm11.length); 38 namelast = nm9[rnd7] + nm10[rnd8] + nm11[rnd11] + nm10[rnd9] + nm11[rnd13] + nm10[rnd12] + nm12[rnd10]; 39 } 40 if (tp === 1) { 41 rnd = Math.floor(Math.random() * nm5.length); 42 rnd2 = Math.floor(Math.random() * nm6.length); 43 rnd5 = Math.floor(Math.random() * nm8.length); 44 if (i < 4) { 45 while (rnd < 7) { 46 rnd = Math.floor(Math.random() * nm5.length); 47 } 48 names = nm5[rnd] + nm6[rnd2] + nm8[rnd5] + " " + namelast; 49 } else if (i < 7) { 50 rnd3 = Math.floor(Math.random() * nm7.length); 51 rnd4 = Math.floor(Math.random() * nm6.length); 52 names = nm5[rnd] + nm6[rnd2] + nm7[rnd3] + nm6[rnd4] + nm8[rnd5] + " " + namelast; 53 } else { 54 rnd3 = Math.floor(Math.random() * nm7.length); 55 rnd4 = Math.floor(Math.random() * nm6.length); 56 rnd5b = Math.floor(Math.random() * nm7.length); 57 rnd6 = Math.floor(Math.random() * nm6.length); 58 names = nm5[rnd] + nm6[rnd2] + nm7[rnd3] + nm6[rnd4] + nm7[rnd5b] + nm6[rnd6] + nm8[rnd5] + " " + namelast; 59 } 60 } else { 61 rnd = Math.floor(Math.random() * nm1.length); 62 rnd2 = Math.floor(Math.random() * nm2.length); 63 rnd5 = Math.floor(Math.random() * nm4.length); 64 if (i < 3) { 65 while (rnd < 5) { 66 rnd = Math.floor(Math.random() * nm1.length); 67 } 68 while (rnd5 < 5) { 69 rnd5 = Math.floor(Math.random() * nm4.length); 70 } 71 names = nm1[rnd] + nm2[rnd2] + nm4[rnd5] + " " + namelast; 72 } else if (i < 7) { 73 rnd3 = Math.floor(Math.random() * nm3.length); 74 rnd4 = Math.floor(Math.random() * nm2.length); 75 names = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm2[rnd4] + nm4[rnd5] + " " + namelast; 76 } else { 77 rnd3 = Math.floor(Math.random() * nm3.length); 78 rnd4 = Math.floor(Math.random() * nm2.length); 79 rnd6 = Math.floor(Math.random() * nm3.length); 80 rnd7 = Math.floor(Math.random() * nm2.length); 81 names = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm2[rnd4] + nm3[rnd6] + nm2[rnd7] + nm4[rnd5] + " " + namelast; 82 } 83 } 84 br = document.createElement('br'); 85 element.appendChild(document.createTextNode(names)); 86 element.appendChild(br); 87 } 88 if (document.getElementById("result")) { 89 document.getElementById("placeholder").removeChild(document.getElementById("result")); 90 } 91 document.getElementById("placeholder").appendChild(element); 92 }