druidGroves.js (2886B)
1 var nm1 = ["Adamant", "Ancient", "Astral", "Beloved", "Blooming", "Boundless", "Bountiful", "Bright", "Brilliant", "Charming", "Cosmic", "Dynamic", "Earthen", "Elder", "Emerald", "Enchanted", "Enlightened", "Ethereal", "Fertile", "First", "Generous", "Gifted", "Golden", "Good", "Grand", "Growing", "Harmonious", "Hidden", "Honored", "Humming", "Jade", "Joyful", "Light", "Living", "Loving", "Lush", "Lustrous", "Nocturnal", "Nomadic", "Original", "Peaceful", "Pleasant", "Primal", "Prime", "Pristine", "Quiet", "Radiant", "Sacred", "Second", "Serene", "Silent", "Slumbering", "Tranquil", "Treasured", "Vagabond", "Verdant", "Vibrant", "Voiceless", "Whispering"]; 2 var nm2 = ["Balance", "Bark", "Beasts", "Beginnings", "Birds", "Birth", "Blooms", "Blossoms", "Brilliance", "Change", "Chaos", "Charity", "Clarity", "Clouds", "Cold", "Critters", "Custodians", "Cycles", "Darkness", "Dawn", "Death", "Dreams", "Dusk", "Earth", "Eternity", "Existence", "Fall", "Fertility", "Fire", "Flowers", "Fortunes", "Frost", "Fungi", "Gardens", "Guardians", "Hawthorns", "Health", "History", "Hope", "Insects", "Islands", "Ivies", "Kindness", "Learning", "Liberty", "Life", "Light", "Loss", "Luck", "Lichen", "Magic", "Moss", "Mountains", "Nature", "Night", "Oaks", "Oceans", "Parents", "Passion", "Patience", "Patterns", "Plants", "Promise", "Prosperity", "Questions", "Rain", "Recovery", "Repose", "Rhythms", "Riddles", "Rivers", "Roots", "Scents", "Secrets", "Servitude", "Sight", "Snow", "Soils", "Songs", "Sound", "Spells", "Spiders", "Spirits", "Spores", "Spring", "Stars", "Storms", "Struggles", "Summer", "Support", "Surprises", "Thorns", "Thrills", "Time", "Tomorrow", "Tranquility", "Vibrance", "Vines", "Voices", "Voyages", "Warmth", "Water", "Weather", "Webs", "Whispers", "Willows", "Wind", "Winter", "Wonders", "the Beginning", "the Cosmos", "the Earth", "the Elements", "the Moon", "the Sky", "the Sun", "the Wild", "the World"]; 3 var nm3 = ["Grove", "Grove", "Grove", "Grove", "Circle", "Circle", "Circle", "Order"]; 4 5 function nameGen() { 6 var br = ""; 7 var element = document.createElement("div"); 8 element.setAttribute("id", "result"); 9 for (i = 0; i < 10; i++) { 10 nTp = Math.random() * 2 | 0; 11 rnd2 = Math.random() * nm3.length | 0; 12 if (nTp === 0) { 13 rnd = Math.random() * nm2.length | 0; 14 names = "The " + nm3[rnd2] + " of " + nm2[rnd]; 15 } else { 16 rnd = Math.random() * nm1.length | 0; 17 names = "The " + nm1[rnd] + " " + nm3[rnd2]; 18 } 19 br = document.createElement('br'); 20 element.appendChild(document.createTextNode(names)); 21 element.appendChild(br); 22 } 23 if (document.getElementById("result")) { 24 document.getElementById("placeholder").removeChild(document.getElementById("result")); 25 } 26 document.getElementById("placeholder").appendChild(element); 27 }