yachtNames.js (2987B)
1 function nameGen() { 2 var nm1 = ["Abundance", "Admiration", "Adventure", "Amazement", "Amazing", "Ambition", "Amusement", "Angel", "Anywhere", "Atmosphere", "Attitude", "Aurora", "Balance", "Ballet", "Beauty", "Beloved", "Benefit", "Borealis", "Boundless", "Bravery", "Brilliance", "Candlelight", "Carefree", "Carpe Diem", "Celebration", "Champion", "Chance", "Charity", "Clarity", "Cloud", "Coral", "Courage", "Course", "Creation", "Creative", "Creator", "Crown", "Curiosity", "Curious", "Cushion", "Dance", "Daydream", "Decision", "Delicacy", "Delight", "Departure", "Design", "Desire", "Destiny", "Dimension", "Dimple", "Direction", "Discovery", "Dream", "Earnest", "Elegance", "Elegant", "Elite", "Emotion", "Enchantment", "Endurance", "Enthusiasm", "Intrepid", "Equilibrium", "Escape", "Eternity", "Ethereal", "Evanescent", "Expansion", "Experience", "Fabulous", "Fae", "Fascinated", "Fascination", "Favored", "Favorite", "Fearless", "Feather", "Flame", "Flawless", "Flight", "Flow", "Flower", "Fortune", "Freedom", "Frontier", "Future", "Generosity", "Gentle", "Gift", "Glorious", "Glory", "Grace", "Graceful", "Guide", "Happiness", "Harmony", "Home Stretch", "Honesty", "Honor", "Honored", "Horizon", "Image", "Imagination", "Impulse", "Infinite", "Invention", "Jewel", "Journey", "Joyous", "Keen", "Kind", "Kindness", "Leader", "Liberty", "Life", "Limit", "Love", "Loyal", "Loyalty", "Luck", "Lucky", "Luminous", "Lustrous", "Luxurious", "Luxury", "Magnificent", "Majesty", "Marvel", "Mellow", "Memory", "Merry", "Message", "Moment", "Mysterious", "Mystery", "New Horizon", "Omen", "One", "Orion", "Passenger", "Passion", "Path", "Pathfinder", "Patience", "Peaceful", "Petal", "Phoenix", "Pillow", "Pleasure", "Poem", "Poet", "Precious", "Presence", "Present", "Prize", "Promise", "Proposal", "Proud", "Purpose", "Question", "Radiant", "Reason", "Rebirth", "Reflection", "Request", "Reveal", "Revolution", "Reward", "Riddle", "Right Course", "Secret", "Serendipity", "Serene", "Serenity", "Sign", "Signal", "Sliver", "Smile", "Smiling", "Spark", "Spirit", "Strength", "Surprise", "Thrill", "Tranquillity", "Twist", "Union", "Vagabond", "Veil", "Victory", "Voice", "Voyage", "Voyager", "Welcome", "Whisper", "Window", "Wish", "Wonder", "World"]; 3 var br = ""; 4 var element = document.createElement("div"); 5 element.setAttribute("id", "result"); 6 for (i = 0; i < 10; i++) { 7 rnd = Math.random() * nm1.length | 0; 8 nTp = Math.random() * 2 | 0; 9 if (nTp === 0) { 10 b = "The "; 11 } else { 12 b = "" 13 } 14 names = b + nm1[rnd]; 15 nm1.splice(rnd, 1); 16 br = document.createElement('br'); 17 element.appendChild(document.createTextNode(names)); 18 element.appendChild(br); 19 } 20 if (document.getElementById("result")) { 21 document.getElementById("placeholder").removeChild(document.getElementById("result")); 22 } 23 document.getElementById("placeholder").appendChild(element); 24 }