demonSlayer.js (2856B)
1 var nm1 = ["Age", "Alcohol", "Anger", "Arthropod", "Aurora", "Balance", "Bird", "Blood", "Bone", "Bubble", "Calm", "Camouflage", "Canine", "Chaos", "Cloud", "Color", "Coral", "Crystal", "Darkness", "Death", "Desire", "Dream", "Dust", "Echo", "Electricity", "Emotion", "Energy", "Fear", "Feline", "Fish", "Frost", "Fungus", "Gravity", "Growth", "Hail", "Hatred", "Ice", "Imagination", "Jewel", "Laughter", "Lava", "Leech", "Light", "Lightning", "Lizard", "Luck", "Magnetism", "Memory", "Metal", "Metamorphosis", "Mud", "Muscle", "Oil", "Pain", "Paper", "Patience", "Plague", "Poison", "Pride", "Puppet", "Rain", "Rainbow", "Reptile", "Sand", "Sensation", "Shadow", "Sight", "Sleep", "Smell", "Smoke", "Snow", "Song", "Sorrow", "Spider", "Spore", "Steam", "Taste", "Thorn", "Thought", "Time", "Twilight", "Ursine", "Vacuum", "Venom", "Vibration", "Vine", "Virus", "Voice", "Void", "Web", "Wing", "Wood"]; 2 var nm2 = ["Altar", "Ant", "Antler", "Bat", "Beach", "Bear", "Beetle", "Bell", "Boar", "Book", "Bovine", "Brain", "Bridge", "Bulb", "Bush", "Canvas", "Cat", "Cave", "Chain", "Claw", "Collar", "Cove", "Crib", "Cricket", "Crow", "Dock", "Doll", "Dream", "Eagle", "Elbow", "Elephant", "Eye", "Face", "Fang", "Farm", "Field", "Finger", "Fish", "Fly", "Foot", "Forest", "Frog", "Garden", "Giant", "Glacier", "Goat", "Grove", "Harbor", "Hare", "Head", "Heron", "Hill", "Hook", "Hornet", "Hound", "Isle", "Knot", "Lake", "Library", "Lighthouse", "Lion", "Lizard", "Locust", "Maid", "Mask", "Mill", "Mine", "Mirror", "Monkey", "Moon", "Mosquito", "Mouse", "Mouth", "Nail", "Neck", "Needle", "Night", "Oasis", "Orchard", "Owl", "Park", "Pig", "Pond", "Pool", "Prison", "Puppet", "Quill", "Rabbit", "Rat", "Rhino", "Ricefield", "Ring", "River", "Road", "Roof", "Rope", "Ruin", "Sea", "Servant", "Shadow", "Shark", "Ship", "Shore", "Snail", "Spa", "Stitched", "Storm", "Straw", "Teeth", "Throne", "Tick", "Tiger", "Toad", "Tomb", "Tooth", "Tower", "Toy", "Turtle", "Tusk", "Urchin", "Volcano", "Wasp", "Waterfall", "Weaver", "Web", "Woods"]; 3 var br = ""; 4 5 function nameGen(type) { 6 var tp = type; 7 $('#placeholder').css('textTransform', 'capitalize'); 8 var element = document.createElement("div"); 9 element.setAttribute("id", "result"); 10 for (i = 0; i < 10; i++) { 11 if (i < 5) { 12 rnd = Math.random() * nm1.length | 0; 13 nMs = nm1[rnd] + " Breathing"; 14 } else { 15 rnd = Math.random() * nm2.length | 0; 16 nMs = nm2[rnd] + " Demon"; 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 }