swKelDorNames.js (4971B)
1 var nm1 = ["", "", "", "", "", "b", "ch", "d", "gn", "h", "j", "k", "n", "p", "pl", "r", "s", "sh", "t", "tr", "v", "w", "x", "y", "z"]; 2 var nm2 = ["a", "e", "i", "o", "u", "a", "o", "y", "a", "e", "i", "o", "u", "a", "o", "y", "a", "o", "a", "e", "i", "o", "u", "a", "o", "y", "a", "e", "i", "o", "u", "a", "o", "y", "a", "o", "ee", "aa", "oo", "ia", "ea"]; 3 var nm3 = ["'r", "c", "c'", "chk", "h", "'h", "k", "'k", "kr", "l'", "ll", "ls", "r", "r'", "rr", "rv", "'s", "s", "st", "tch", "t'", "tchk", "z", "z'", "'z"]; 4 var nm4 = ["", "", "", "", "", "", "l", "ln", "lt", "m", "n", "r", "rn", "rs", "rss", "s", "ss", "st"]; 5 var nm5 = ["", "", "", "", "bh", "ch", "dh", "dr", "gh", "g", "h", "kr", "m", "n", "p", "r", "s", "sh", "t", "th", "y", "v", "w"]; 6 var nm6 = ["a", "i", "u", "a", "i", "a", "i", "u", "e", "a", "i", "o", "ee"]; 7 var nm7 = ["'c", "ch", "h", "'h", "k", "kh", "'k", "'l", "l", "q", "'q", "qr", "r", "'r", "rr", "rz", "st", "s'", "sz", "th", "t'", "'z"]; 8 var nm8 = ["", "", "", "", "", "", "", "l", "m", "n", "s", "th"]; 9 var nm9 = ["", "", "", "", "", "b", "br", "ch", "d", "dr", "g", "h", "k", "m", "n", "p", "r", "s", "sh", "t", "tl", "v", "y", "z"]; 10 var nm10 = ["a", "e", "i", "o", "u", "a", "a", "e", "i", "o", "u", "a", "a", "e", "i", "o", "u", "a", "a", "e", "i", "o", "u", "a", "a", "e", "i", "o", "u", "a", "ii", "ai", "oo", "aa", "uu"]; 11 var nm11 = ["c", "ch", "g", "hr", "k", "kr", "l", "lr", "mn", "n", "nd", "r", "rr", "rv", "s", "sz", "st", "t", "tch", "z"]; 12 var nm12 = ["", "", "", "", "", "", "", "", "c", "k", "l", "ln", "mm", "n", "ng", "r", "s", "ss", "w", "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 < 5) { 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 < 4) { 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 < 5) { 65 while (rnd < 5) { 66 rnd = Math.floor(Math.random() * nm1.length); 67 } 68 names = nm1[rnd] + nm2[rnd2] + nm4[rnd5] + " " + namelast; 69 } else { 70 rnd3 = Math.floor(Math.random() * nm3.length); 71 rnd4 = Math.floor(Math.random() * nm2.length); 72 names = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm2[rnd4] + nm4[rnd5] + " " + namelast; 73 } 74 } 75 br = document.createElement('br'); 76 element.appendChild(document.createTextNode(names)); 77 element.appendChild(br); 78 } 79 if (document.getElementById("result")) { 80 document.getElementById("placeholder").removeChild(document.getElementById("result")); 81 } 82 document.getElementById("placeholder").appendChild(element); 83 }