Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
39 lines (38 sloc) 7.25 KB
<!doctype html>
<html>
<head>
<link href='http://fonts.googleapis.com/css?family=Trocchi' rel='stylesheet' type='text/css'>
<link href='css/style.css' rel='stylesheet' type='text/css'>
<script type="text/javascript">
var first = ["amber", "anchor", "anger", "apple", "argyle", "armor", "arrow", "badger", "ballast", "balsam", "bantam", "barber", "barley", "barrow", "basil", "basin", "basket", "battle", "beauty", "bedroom", "beetle", "beggar", "berry", "birdcage", "bishop", "blossom", "bluebird", "blueprint", "bonnet", "bourbon", "breakfast", "brother", "bubble", "bucket", "buoy", "burlap", "butler", "butter", "button", "cabbage", "cable", "cactus", "camphor", "candle", "cannon", "canvas", "captain", "caption", "carrot", "castle", "cattle", "cedar", "cellar", "channel", "cheddar", "cherry", "chicken", "children", "cider", "cipher", "circle", "clover", "cobalt", "cobweb", "cocoa", "coil", "colonel", "column", "compass", "copper", "cotton", "country", "cracker", "creature", "cycle", "daisy", "danger", "daughter", "denim", "diamond", "dinner", "doctor", "dollar", "donkey", "dovetail", "dutchess", "eagle", "earthquake", "empress", "engine", "family", "father", "faucet", "favor", "feather", "fiddle", "fiddler", "flower", "fortune", "freckle", "galley", "gannet", "garnet", "gingham", "goblin", "goldfish", "hammer", "hazel", "heather", "hobby", "holly", "honey", "jackal", "jacket", "jewel", "justice", "kerning", "lady", "lawyer", "leather", "leopard", "letter", "lettuce", "linen", "lion", "lobster", "locket", "lumber", "magic", "marble", "market", "marlin", "marrow", "mayor", "mitre", "mitten", "money", "morning", "mortar", "mother", "mountain", "mushroom", "music", "nation", "needle", "nickel", "notebook", "novel", "number", "nutmeg", "oatmeal", "ocean", "opal", "owl", "oxen", "paintbrush", "painter", "paper", "parcel", "parent", "parsley", "pebble", "pencil", "penny", "pepper", "pickle", "picture", "pistol", "pocket", "poem", "poison", "porter", "potter", "pulley", "quicksand", "quiet", "quiver", "rabbit", "railway", "rainstorm", "riddle", "rifle", "river", "robin", "sailor", "salmon", "sandstone", "satchel", "satin", "sawdust", "scarecrow", "seashore", "selvage", "serif", "shadow", "sherry", "shipwright", "shovel", "spider", "spigot", "spindle", "sprocket", "spyglass", "station", "stranger", "sugar", "summer", "sweater", "table", "tailor", "tanner", "tartan", "temper", "tempest", "temple", "tiger", "tinker", "toadstool", "tower", "trilby", "trousers", "tulip", "turkey", "uncle", "vapor", "vellum", "velvet", "victim", "village", "violet", "viper", "virtue", "vodka", "voyage", "waistcoat", "water", "weather", "whiskey", "whistle", "windmill", "winter", "wishbone", "woman", "wonder", "woodchuck", "writer", "yarrow", "zebra", "zephyr", "zeppelin"]
var second = ["axe", "ale", "ant", "aunt", "awl", "bait", "band", "bank", "bath", "bay", "bead", "beam", "bean", "bear", "beard", "beast", "quill", {"word": "bell", "variant": "bells"}, "boar", "bird", "blade", "bliss", "blood", "board", "boat", {"word": "bone", "variant": "bones"}, "book", "boot", "boy", "braid", "branch", "brass", "bread", "brick", "brush", "cake", "dove", "cape", "chain", "chair", "chance", "cheese", "chief", "child", "chord", "city", "clam", "cliff", "clock", "cloth", {"word": "cloud", "variant": "clouds"}, "coach", "coast", {"word": "coat", "variant": "coats"}, "code", "cold", "cord", "corn", {"word": "cow", "variant": "cows"}, "crane", {"word": "crate", "variant": "crates"}, "cream", "crook", "cross", "crown", {"word": "day", "variant": "days"}, "dean", "death", "deer", "desk", "dime", {"word": "dog", "variant": "dogs"}, {"word": "doll", "variant": "dolls"}, {"word": "door", "variant": "doors"}, "dream", "dress", "drum", {"word": "duck", "variant": "ducks"}, "duke", {"word": "dune", "variant": "dunes"}, "dust", "ear", "earth", "east", "edge", "egg", {"word": "elf", "variant": "elves"}, "faith", "fang", "feast", "fern", {"word": "field", "variant": "fields"}, "fight", "flag", "flame", "flesh", "flint", "flock", "fog", "plum", "fox", "frame", "frog", "frost", "fruit", "gate", "geese", "ghost", "gin", "girl", "glass ", "ape", "goat", {"word": "goose", "variant": "geese"}, "grain", {"word": "grape", "variant": "grapes"},"grass", "grouse", "gull", "gun", "hair", "hall", {"word": "hat", "variant": "hats"}, "heart", "hearth", "hen", {"word": "hill", "variant": "hills"}, "home", "hook", "hope", "horn", "horse", "hound", "iron", "jail", "jam", {"word": "jar", "variant": "jars"}, "joy", "judge", {"word": "kite", "variant": "kites"}, "knife", "knob", "knot", "lace", "lake", "lamb", "lamp", {"word": "light", "variant": "lights"}, "lime", {"word": "loaf", "variant": "loaves"}, {"word": "lock", "variant": "locks"}, "loom", "lunch", "maid", {"word": "map", "variant": "maps"}, "mask", "meat", "mice", "milk", "mint",{"word": "mole", "variant": "moles"},"moth", "moon", "mouse", "nest", "north", {"word": "pail", "variant": "pails"},{"word": "park", "variant": "parks"},{"word": "pear", "variant": "pears"},{"word": "pen", "variant": "pens"},{"word": "pig", "variant": "pigs"}, "plaid", "queen", "quilt", "rain", "rake", "rat",{"word": "road", "variant": "roads"},{"word": "rose", "variant": "roses"},"rye", "sack",{"word": "sail", "variant": "sails"},"salt", "scale",{"word": "scarf", "variant": "scarves"},"sea", "seed",{"word": "shoe", "variant": "shoes"},"silk", "sink", "sleet", "smoke",{"word": "snail", "variant": "snails"},{"word": "snake", "variant": "snakes"},"snow", "soap",{"word": "son", "variant": "sons"},{"word": "song", "variant": "songs"},"spark",{"word": "spools", "variant": "spool"},"spoon",{"word": "spy", "variant": "spies"},"stage",{"word": "star", "variant": "stars"},"steel",{"word": "stone", "variant": "stones"},"stove", "straw", "stream", "street", "string", "quince", "sun", "steam", "sword", "sage", "tern",{"word": "thief", "variant": "thieves"},"thorn", "thread", "throne", "toad", "tomb", "tooth", "town", "tramp", "tree", "twig", "twine", "vase", "veil", "vein", "vest", "vine", "well", "whale",{"word": "wharf", "variant": "wharves"},"wheel", "wine",{"word": "wing", "variant": "wings"},"wire", "wish",{"word": "wolf", "variant": "wolves"},"wood", "wool", "wren", "wrench", "wrist", "yard", "yarn"]
function makename(){
var r1=Math.floor(Math.random()*first.length),
r2=Math.floor(Math.random()*second.length),
words = [],
name="";
words.push(first[r1]);
if(!second[r2].word){
words.push(second[r2]);
} else {
r3 = Math.floor(Math.random()*2);
if(r3){
words.push(second[r2].word);
}else{
words.push(second[r2].variant);
}
}
if(Math.round(Math.random())){
name = words[0] + " & " + words[1];
} else {
name = words[1] + " & " + words[0];
}
document.getElementById("compname").innerHTML = name;
}
</script>
</head>
<body onload="makename()">
<h1 id="compname" style="text-transform: capitalize"></h1>
<a href="#" onclick="makename()">ANOTHER!</a>
</body>
</html>