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.
20 lines
2.7 KiB
JavaScript
20 lines
2.7 KiB
JavaScript
var br = "";
|
|
|
|
function nameGen() {
|
|
var nm1 = ["Adept", "Agent", "Alchemist", "Archer", "Audience", "Autumn", "Bard", "Beam", "Beauty", "Border", "Brasshorn", "Brave", "Brawler", "Bridge", "Brother", "Candle", "Canvas", "Challenge", "Chameleon", "Champion", "Chance", "Chaos", "Charity", "Child", "Clarity", "Cleric", "Climber", "Clock", "Cloud", "Cold", "Comfort", "Concern", "Conflict", "Conjurer", "Constant", "Corsair", "Courage", "Creative", "Creator", "Crusader", "Curious", "Cushion", "Dancer", "Darkness", "Day", "Defender", "Designer", "Disaster", "Discoverer", "Disturbance", "Doctor", "Dreamer", "Druid", "Duty", "Elementalist", "Emissary", "Enchanter", "Engineer", "Eternal", "Explorer", "Family", "Father", "Firehorn", "Flame", "Fluke", "Focused", "Fortunate", "Fortune", "Free", "Friend", "Frosthorn", "Future", "Gardener", "Gentle", "Gentlehand", "Giant", "Gladiator", "Good", "Great", "Greatheart", "Grimoire", "Guard", "Guardian", "Happy", "Harbinger", "Healer", "Heart", "Hearth", "Home", "Honest", "Honor", "Hunter", "Illusionist", "Impulse", "Jester", "Joker", "Journey", "Justice", "Keeneyes", "Kind", "Knight", "Knowledge", "Lantern", "Laughter", "Leader", "Light", "Living", "Loyal", "Lucky", "Marble", "Mask", "Might", "Mirror", "Mother", "Mountain", "Music", "Mystic", "Navigator", "Night", "Omen", "Oracle", "Paladin", "Paragon", "Passage", "Passenger", "Passion", "Past", "Pathfinder", "Patient", "Pirate", "Play", "Poem", "Poet", "Possiblity", "Pride", "Prism", "Prize", "Promise", "Prophet", "Purpose", "Question", "Ranger", "Ravager", "Redemption", "Reflection", "Regret", "Relief", "Reward", "Riches", "Riddle", "Risk", "River", "Ruin", "Rumor", "Safe", "Safety", "Scout", "Secret", "Service", "Shadow", "Shield", "Shining", "Sibling", "Singer", "Skyguard", "Smile", "Smoke", "Softhand", "Song", "Sorcerer", "Sorrow", "Spark", "Spirit", "Spring", "Storm", "Strange", "Stranger", "Stronghand", "Struggle", "Student", "Success", "Summer", "Surprise", "Sword", "Teacher", "Tempest", "Thrill", "Throne", "Thunder", "Tomorrow", "Tree", "Victory", "Warden", "Warmth", "Warrior", "Weaver", "Winter", "Witch", "Yesterday"];
|
|
var element = document.createElement("div");
|
|
element.setAttribute("id", "result");
|
|
for (i = 0; i < 10; i++) {
|
|
rnd = Math.random() * nm1.length | 0;
|
|
nMs = nm1[rnd];
|
|
nm1.splice(rnd, 1);
|
|
br = document.createElement('br');
|
|
element.appendChild(document.createTextNode(nMs));
|
|
element.appendChild(br);
|
|
}
|
|
if (document.getElementById("result")) {
|
|
document.getElementById("placeholder").removeChild(document.getElementById("result"));
|
|
}
|
|
document.getElementById("placeholder").appendChild(element);
|
|
}
|