You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
2.9 KiB
JavaScript
25 lines
2.9 KiB
JavaScript
function nameGen() {
|
|
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"];
|
|
var br = "";
|
|
var element = document.createElement("div");
|
|
element.setAttribute("id", "result");
|
|
for (i = 0; i < 10; i++) {
|
|
rnd = Math.random() * nm1.length | 0;
|
|
nTp = Math.random() * 2 | 0;
|
|
if (nTp === 0) {
|
|
b = "The ";
|
|
} else {
|
|
b = ""
|
|
}
|
|
names = b + nm1[rnd];
|
|
nm1.splice(rnd, 1);
|
|
br = document.createElement('br');
|
|
element.appendChild(document.createTextNode(names));
|
|
element.appendChild(br);
|
|
}
|
|
if (document.getElementById("result")) {
|
|
document.getElementById("placeholder").removeChild(document.getElementById("result"));
|
|
}
|
|
document.getElementById("placeholder").appendChild(element);
|
|
}
|