rsDorgeshuun.js (1604B)
1 var nm1 = ["", "", "b", "c", "d", "f", "g", "h", "j", "k", "l", "m", "n", "r", "t", "z"] 2 var nm2 = ["a", "a", "e", "e", "i", "o", "o", "u", "u", "y"] 3 var nm3 = ["", "", "b", "g", "k", "l", "m", "n", "r", "s", "z"] 4 var nm4 = ["d", "g", "k", "l", "n", "t", "z"] 5 var nm5 = ["a", "i", "o", "a", "i", "o", "e"] 6 var nm6 = ["", "", "g", "k", "l", "ll", "lt", "n", "r", "s", "sh", "ss"] 7 var br = ""; 8 9 function nameGen() { 10 $('#placeholder').css('textTransform', 'capitalize'); 11 var element = document.createElement("div"); 12 element.setAttribute("id", "result"); 13 for (i = 0; i < 10; i++) { 14 nameMas(); 15 while (nMs === "") { 16 nameMas(); 17 } 18 br = document.createElement('br'); 19 element.appendChild(document.createTextNode(nMs)); 20 element.appendChild(br); 21 } 22 if (document.getElementById("result")) { 23 document.getElementById("placeholder").removeChild(document.getElementById("result")); 24 } 25 document.getElementById("placeholder").appendChild(element); 26 } 27 28 function nameMas() { 29 rnd = Math.random() * nm1.length | 0; 30 rnd2 = Math.random() * nm2.length | 0; 31 rnd3 = Math.random() * nm3.length | 0; 32 rnd4 = Math.random() * nm4.length | 0; 33 rnd5 = Math.random() * nm5.length | 0; 34 rnd6 = Math.random() * nm6.length | 0; 35 while (nm3[rnd3] === nm4[rnd4]) { 36 rnd3 = Math.random() * nm3.length | 0; 37 } 38 while (nm1[rnd] === "" && nm6[rnd6] === "") { 39 rnd6 = Math.random() * nm6.length | 0; 40 } 41 nMs = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm4[rnd4] + nm5[rnd5] + nm6[rnd6]; 42 testSwear(nMs); 43 }