swKowakian.js (4163B)
1 var nm1 = ["b", "h", "l", "m", "n", "p", "r", "t"]; 2 var nm2 = ["ee", "ie", "ei", "ai", "i", "o", "u", "i", "o", "u", "a", "e", "i", "o", "u", "i", "o", "u", "a", "e"]; 3 var nm3 = ["h", "l", "n", "r", "t", "v", "z"]; 4 var nm4 = ["a", "e", "i", "o", "u", "i"]; 5 var nm5 = ["d", "k", "kk", "l", "ld", "lf", "lk", "nq", "nt", "rd", "rk", "rq", "s", "sk", "sq", "ss", "st", "x", "z", "zz"]; 6 var nm6 = ["k", "q", "d", "p", "r", "t", "v", "z"]; 7 var nm7 = ["Aloof", "Ambiguous", "Ambitious", "Antsy", "Anxious", "Avaricious", "Barbarous", "Bashful", "Blissful", "Bohemian", "Bountiful", "Breezy", "Bubbly", "Buccaneer", "Callous", "Canine", "Capricious", "Careless", "Cheery", "Clueless", "Clumsy", "Conscious", "Corsair", "Crabby", "Craven", "Curious", "Delirious", "Dizzy", "Dopey", "Draconian", "Drifter", "Droopy", "Dusty", "Envious", "Fabulous", "Fallacious", "Fanatical", "Fearless", "Finicky", "Flaky", "Flimsy", "Foolish", "Frizzy", "Garrulous", "Glamorous", "Greasy", "Gregarious", "Grizzly", "Grotesque", "Grumpy", "Harmless", "Hideous", "Hilarious", "Humorous", "Icky", "Impish", "Insidious", "Itchy", "Joyous", "Jubilant", "Juvenile", "Knave", "Kooky", "Lucky", "Ludicrous", "Mad", "Malicious", "Maverick", "Measly", "Merry", "Monstrous", "Nervous", "Nimble", "Noxious", "Oafish", "Oblivious", "Obnoxious", "Outrageous", "Paltry", "Petty", "Pompous", "Precious", "Prickly", "Puny", "Rambunctious", "Rascal", "Ratty", "Reckless", "Rifler", "Ritzy", "Rogue", "Rover", "Rowdy", "Rusty", "Scandalous", "Scoundrel", "Scrawny", "Shady", "Silent", "Sleepy", "Slimy", "Sloppy", "Squiggly", "Suspicious", "Swindler", "Tedious", "Teeny", "Tenuous", "Thrifty", "Trusty", "Uppity", "Vagabond", "Vagrant", "Vapid", "Vicious", "Vivid", "Volatile", "Voracious", "Wiggly", "Wobbly", "Wretched", "Zealous"]; 8 var nm8 = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "z"]; 9 var br = ""; 10 11 function nameGen(type) { 12 var tp = type; 13 $('#placeholder').css('textTransform', 'capitalize'); 14 var element = document.createElement("div"); 15 element.setAttribute("id", "result"); 16 for (i = 0; i < 10; i++) { 17 nL = Math.random() * 5 | 0; 18 nameMas(); 19 while (nMs === "") { 20 nameMas(); 21 } 22 names = nMs; 23 if (nL < 3) { 24 if (names.length > 3) { 25 nameMas(); 26 while (nMs === "") { 27 nameMas(); 28 } 29 if (nMs.length === 3) { 30 names += " " + nMs + nMs; 31 } else { 32 names += " " + nMs; 33 } 34 } else { 35 names += names; 36 } 37 } else { 38 rnd = Math.random() * nm7.length | 0; 39 rnd2 = Math.random() * nm8.length | 0; 40 names = nm7[rnd] + " " + nm8[rnd2] + ". " + names; 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 } 51 52 function nameMas() { 53 nTp = Math.random() * 10 | 0; 54 rnd = Math.random() * nm1.length | 0; 55 rnd2 = Math.random() * nm2.length | 0; 56 if (nTp < 3) { 57 rnd3 = Math.random() * nm6.length | 0; 58 while (nm1[rnd] === nm6[rnd3]) { 59 rnd3 = Math.random() * nm6.length | 0; 60 } 61 nMs = nm1[rnd] + nm2[rnd2] + nm6[rnd3]; 62 } else if (nTp < 6) { 63 rnd3 = Math.random() * nm5.length | 0; 64 while (nm1[rnd] === nm5[rnd3]) { 65 rnd3 = Math.random() * nm5.length | 0; 66 } 67 nMs = nm1[rnd] + nm2[rnd2] + nm5[rnd3]; 68 } else { 69 rnd4 = Math.random() * nm3.length | 0; 70 rnd5 = Math.random() * nm4.length | 0; 71 while (nm3[rnd4] === nm1[rnd] || nm3[rnd4] === nm7[rnd3]) { 72 rnd4 = Math.random() * nm3.length | 0; 73 } 74 nMs = nm1[rnd] + nm2[rnd2] + nm3[rnd4] + nm4[rnd5]; 75 } 76 testSwear(nMs); 77 }