sithNames.js (3615B)
1 var nm1 = ["a", "i", "o", "u", "â", "û", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""]; 2 var nm2 = ["ch", "d", "dz", "h", "j", "k", "kr", "kh", "m", "n", "l", "q", "r", "rh", "s", "sh", "sr", "t", "ts", "w", "wr", "wh", "y", "z", "zh", "zr", "ch", "d", "h", "j", "k", "m", "n", "l", "q", "r", "s", "t", "w", "y", "z"]; 3 var nm3 = ["a", "i", "o", "u", "ai", "oi", "a", "i", "o", "u", "a", "i", "o", "u", "â", "û"]; 4 var nm4 = ["d", "h", "j", "k", "l", "m", "n", "sh", "q", "r", "s", "t", "ts", "w", "y", "z"]; 5 var nm5 = ["d", "h", "j", "k", "l", "m", "n", "sh", "q", "r", "s", "t", "ts", "w", "y", "z", "", "", "", "", "", "", "", "", "", "", "", "", ""]; 6 var nm6 = ["a", "û", "â", "i", "o", "u", "ai", "oi"]; 7 var nm7 = ["r", "t", "s", "sh", "z", "n", "m", "ts", "l", "w", "", "", "", ""]; 8 var nm8 = ["a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""]; 9 var nm9 = ["b", "bh", "br", "c", "ch", "cl", "d", "dr", "dh", "g", "gr", "gh", "j", "k", "kh", "m", "n", "p", "pl", "q", "r", "rh", "s", "sl", "sh", "t", "tr", "v", "vl", "vr", "w", "wr", "wh", "x", "y", "z", "zh", "zr", "b", "c", "d", "g", "j", "k", "m", "n", "p", "q", "r", "s", "t", "v", "w", "x", "y", "z"]; 10 var nm10 = ["a", "e", "i", "o", "u", "ae", "ea", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u"]; 11 var nm11 = ["d", "g", "h", "k", "l", "m", "n", "p", "q", "r", "s", "t", "v", "x"]; 12 var nm12 = ["b", "c", "d", "g", "k", "l", "m", "n", "p", "r", "s", "t", "v", "w", "z", "", "", "", "", "", "", "", "", "", "", "", "", ""]; 13 var nm13 = ["a", "e", "i", "o", "u", "iu", "ae", "ia", "ua", "uo", "ea", "iu", "ae", "ia", "ua"]; 14 var nm14 = ["th", "s", "sh", "n", "m", "x", "l", "wr", "sy", "ty", "tiur", "tiuth", "siuth", "ny", "nyr", "lyr", "rius", "", "", "", "", "", "", "", "", "", "", "", "", ""]; 15 var br = ""; 16 17 function nameGen(type) { 18 $('#placeholder').css('textTransform', 'capitalize'); 19 var tp = type; 20 var element = document.createElement("div"); 21 element.setAttribute("id", "result"); 22 for (i = 0; i < 10; i++) { 23 if (tp === 1) { 24 rnd = Math.floor(Math.random() * nm8.length); 25 rnd2 = Math.floor(Math.random() * nm9.length); 26 rnd3 = Math.floor(Math.random() * nm10.length); 27 rnd4 = Math.floor(Math.random() * nm11.length); 28 rnd5 = Math.floor(Math.random() * nm12.length); 29 rnd6 = Math.floor(Math.random() * nm13.length); 30 rnd7 = Math.floor(Math.random() * nm14.length); 31 names = nm8[rnd] + nm9[rnd2] + nm10[rnd3] + nm11[rnd4] + nm12[rnd5] + nm13[rnd6] + nm14[rnd7]; 32 } else { 33 rnd = Math.floor(Math.random() * nm1.length); 34 rnd2 = Math.floor(Math.random() * nm2.length); 35 rnd3 = Math.floor(Math.random() * nm3.length); 36 rnd4 = Math.floor(Math.random() * nm4.length); 37 rnd5 = Math.floor(Math.random() * nm5.length); 38 rnd6 = Math.floor(Math.random() * nm6.length); 39 rnd7 = Math.floor(Math.random() * nm7.length); 40 names = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm4[rnd4] + nm5[rnd5] + nm6[rnd6] + nm7[rnd7]; 41 } 42 br = document.createElement('br'); 43 element.appendChild(document.createTextNode(names)); 44 element.appendChild(br); 45 } 46 if (document.getElementById("result")) { 47 document.getElementById("placeholder").removeChild(document.getElementById("result")); 48 } 49 document.getElementById("placeholder").appendChild(element); 50 }