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.
22 lines
2.4 KiB
JavaScript
22 lines
2.4 KiB
JavaScript
function nameGen() {
|
|
var nm1 = ["Adamant", "Air", "Airy", "Amazing", "Ancient", "Aquatic", "Aromatic", "Austere", "Autumn", "Beloved", "Black", "Blazing", "Blind", "Bold", "Bountiful", "Brave", "Bright", "Bronze", "Cozy", "Curious", "Dapper", "Defiant", "Diligent", "Drunk", "Earnest", "Earth", "Earthen", "Eastern", "Elegant", "Emerald", "Enchanted", "Enlightened", "Exalted", "Excited", "Fabulous", "Fearless", "Fire", "Flaming", "Fragrant", "Frosty", "Frozen", "Gentle", "Golden", "Gracious", "Great", "Handsome", "Happy", "Honorable", "Humble", "Hungry", "Idle", "Infamous", "Iron", "Jade", "Jolly", "Kindred", "Laughing", "Little", "Lone", "Lost", "Lucky", "Mellow", "Modest", "Mysterious", "Northern", "Parched", "Peaceful", "Playful", "Proud", "Radiant", "Royal", "Ruby", "Rustic", "Sapphire", "Seasonal", "Secret", "Serene", "Silent", "Silk", "Sleepy", "Smiling", "Southern", "Sparkling", "Spring", "Summer", "Sweet", "Tranquil", "United", "Velvet", "Vibrant", "Virtuous", "Volatile", "Water", "Western", "Whimsical", "White", "Wild", "Winter", "Wise", "Worthy"];
|
|
var nm2 = ["Arrow", "Bacui", "Badgerfrog", "Badgermole", "Banyan", "Bender", "Bison", "Blossom", "Boomerang", "Bow", "Cat", "Comet", "Cottage", "Crown", "Den", "Djembe", "Dog", "Dragon", "Dragonfly", "Drum", "Elephant Koi", "Erhu", "Explorer", "Ferret", "Flower", "Glider", "Grove", "Hog Monkey", "Jasmine", "Jewel", "Katana", "Koalaotter", "Koi", "Leaf", "Lemur", "Lily", "Lion Turtle", "Lionturtle", "Lotus", "Lychee", "Panda Lily", "Penguin", "Petal", "Phoenix", "Pillow", "Platypus Bear", "Poodle Monkey", "Scimitar", "Seal", "Serpent", "Shield", "Sparrowkeet", "Spirit", "Sword", "Tiger Monkey", "Tile", "Tsungi", "Turtle Duck", "Unagi", "Wolfbat"];
|
|
var br = "";
|
|
var element = document.createElement("div");
|
|
element.setAttribute("id", "result");
|
|
for (i = 0; i < 10; i++) {
|
|
rnd = Math.random() * nm1.length | 0;
|
|
rnd2 = Math.random() * nm2.length | 0;
|
|
nMs = "The " + nm1[rnd] + " " + nm2[rnd2];
|
|
nm1.splice(rnd, 1);
|
|
nm2.splice(rnd2, 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);
|
|
}
|