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.

92 lines
3.6 KiB
JavaScript

var nm1 = [
["Ōkami", "Wolf"],
["Ame", "Rain"],
["Arashi", "Storm"],
["Ashita", "Tomorrow"],
["Atama", "Head"],
["Bakemono", "Monster"],
["Byōki", "Ilness"],
["Chō", "Butterfly"],
["Chōkoku", "Sculpture"],
["Chi", "Blood"],
["Ebi", "Shrimp"],
["Hana", "Flower"],
["Hebi", "Snake"],
["Heishi", "Soldier"],
["Higashi", "East"],
["Hige", "Beard"],
["Hone", "Bone"],
["Hotaru", "Firefly"],
["Inu", "Dog"],
["Isha", "Doctor"],
["Kōri", "Ice"],
["Kaeru", "Frog"],
["Kaminari", "Thunder"],
["Kangoshi", "Nurse"],
["Kao", "Face"],
["Karasu", "Crow"],
["Kasa", "Umbrella"],
["Kashu", "Singer"],
["Kimono", "Kimono"],
["Kin", "Gold"],
["Kinoko", "Mushroom"],
["Kinzoku", "Metal"],
["Kita", "North"],
["Kodomo", "Children"],
["Koko", "Here"],
["Kokoro", "Feelings/Heart"],
["Kuchi", "Mouth"],
["Kuma", "Bear"],
["Kumo", "Spider"],
["Kuri", "Chestnut"],
["Minami", "South"],
["Momo", "Peach"],
["Mushi", "Insect"],
["Neko", "Cat"],
["Nishi", "Nishi"],
["Onaka", "Stomach"],
["Ongaku", "Music"],
["Oyatsu", "Snack"],
["Sakura", "Cherry Blossom"],
["Saru", "Monkey"],
["Satō", "Sugar"],
["Sensei", "Teacher"],
["Suzume", "Sparrow"],
["Tō", "Ten Things"],
["Tako", "Octopus"],
["Tora", "Tiger"],
["Tsuki", "Moon"],
["Yu", "Hot Water"],
["Yuki", "Snow"],
["Zō", "Elephant"],
["Vegetables", "Yasai"],
["Chopsticks", "Hashi"]
];
var nm2 = ["Aberrant", "Adventure", "Albatross", "Amusement", "Animal", "Ant", "Balloon", "Bandana", "Battle", "Beach", "Beetle", "Bell", "Bird", "Bone", "Bullfrog", "Candle", "Carp", "Carpenter", "Celebration", "Champion", "Chaos", "Cloud", "Clover", "Cobweb", "Crook", "Curiosity", "Delight", "Desire", "Diamond", "Dinosaur", "Doll", "Donkey", "Dream", "Drum", "Earthquake", "Escape", "Feather", "Flower", "Fortune", "Freedom", "Full Moon", "Garbage", "Ghost", "Giant", "Giant Snail", "Guitar", "Horror", "Ice", "Imaginary", "Ink", "Insect", "Jelly", "Jellyfish", "Jewel", "King", "Kitten", "Ladybug", "Lantern", "Lilypad", "Luxury", "Mangrove", "Midnight", "Miniature", "Misery", "Monsoon", "Monument", "Needle", "Nightingale", "Octopus", "Orchard", "Pancake", "Parasol", "Possibility", "Pufferfish", "Quicksand", "Rabbit", "Riddle", "Robin", "Seahorse", "Seal", "Secret", "Shadow", "Silver", "Songbird", "Stranger", "Straw", "Surf", "Thicket", "Thrill", "Thunder", "Tigerlily", "Truce", "Umbrella", "Victory", "Waterfall", "Whistle", "Wilderness"];
var nm3 = ["Island", "Island", "Island", "Island", "Island", "Islands", "Archipelago", "Land"];
var br = "";
function nameGen() {
$('#placeholder').css('textTransform', 'capitalize');
var element = document.createElement("div");
element.setAttribute("id", "result");
for (i = 0; i < 10; i++) {
nTp = Math.random() * 3 | 0;
rnd2 = Math.random() * nm3.length | 0;
if (nTp === 0) {
rnd = Math.random() * nm1.length | 0;
names = nm1[rnd][0] + " " + nm3[rnd2] + " (" + nm1[rnd][1] + ")";
} else {
rnd = Math.random() * nm2.length | 0;
names = nm2[rnd] + " " + nm3[rnd2];
}
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);
}