narniaStars.js (2975B)
1 var nm1 = ["", "", "", "c", "d", "g", "k", "m", "n", "r", "s", "t", "z"]; 2 var nm2 = ["a", "i", "o", "u", "a", "i", "o", "u", "a", "i", "o", "u", "a", "i", "o", "u", "a", "i", "o", "u", "ia", "ea", "ua"]; 3 var nm3 = ["g", "gn", "l", "lm", "ln", "m", "mn", "n", "r", "rv", "v", "w", "z"]; 4 var nm4 = ["c", "d", "g", "gn", "gd", "k", "kn", "l", "ll", "ld", "lg", "ln", "mb", "mn", "m", "ml", "nd", "ng", "nm", "nn", "n", "nt", "nz", "rn", "rl", "sn", "sl", "s", "z"]; 5 var nm5 = ["", "", "", "", "d", "l", "m", "n", "s"]; 6 var check = ["anal", "anus", "arse", "ass", "balls", "bastard", "biatch", "bigot", "bitch", "bollock", "bollok", "boner", "boob", "bugger", "bum", "butt", "clitoris", "cock", "coon", "crap", "cunt", "damn", "dick", "dildo", "dyke", "fag", "feck", "felching", "fellate", "fellatio", "flange", "fuck", "gay", "lust", "goddamn", "homo", "jackass", "jerk", "jizz", "knobend", "labia", "muff", "nigga", "nigger", "penis", "piss", "poop", "prick", "pube", "pussy", "queer", "scrotum", "sex", "shit", "slut", "smegma", "spunk", "tit", "tosser", "turd", "twat", "vagina", "wank", "whore", "wtf"]; 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 rnd = Math.random() * nm1.length | 0; 15 rnd2 = Math.random() * nm2.length | 0; 16 rnd3 = Math.random() * nm3.length | 0; 17 rnd4 = Math.random() * nm2.length | 0; 18 rnd5 = Math.random() * nm5.length | 0; 19 if (i < 5) { 20 if (rnd < 3) { 21 while (rnd5 < 4) { 22 rnd5 = Math.random() * nm5.length | 0; 23 } 24 } 25 names = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm2[rnd4] + nm5[rnd5]; 26 for (j = 0; j < check.length; j++) { 27 while (names === check[j]) { 28 rnd3 = Math.floor(Math.random() * nm3.length); 29 names = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm2[rnd4] + nm5[rnd5]; 30 } 31 } 32 } else { 33 rnd6 = Math.random() * nm4.length | 0; 34 rnd7 = Math.random() * nm2.length | 0; 35 names = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm2[rnd4] + nm4[rnd6] + nm2[rnd7] + nm5[rnd5]; 36 for (j = 0; j < check.length; j++) { 37 while (names === check[j]) { 38 rnd3 = Math.floor(Math.random() * nm3.length); 39 names = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm2[rnd4] + nm4[rnd6] + nm2[rnd7] + nm5[rnd5]; 40 } 41 } 42 } 43 br = document.createElement('br'); 44 element.appendChild(document.createTextNode(names)); 45 element.appendChild(br); 46 } 47 if (document.getElementById("result")) { 48 document.getElementById("placeholder").removeChild(document.getElementById("result")); 49 } 50 document.getElementById("placeholder").appendChild(element); 51 }