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.1 KiB
JavaScript
20 lines
2.1 KiB
JavaScript
var br = "";
|
|
|
|
function nameGen() {
|
|
var nm1 = ["Abaca", "Alpaca", "Ambitious", "Angora", "Anxious", "Awningstripe", "Bamboo", "Bamboostitch", "Barleycorn", "Basketweave", "Birdseye", "Bobblestitch", "Botanical", "Brioche", "Bubblestitch", "Buffalo", "Burlap", "Buttoneyes", "Camo", "Carefree", "Careless", "Caring", "Cashmere", "Chalkstripe", "Checker", "Chevron", "Chinoserie", "Clockwhirr", "Coir", "Collage", "Contour", "Coral", "Cotton", "Crazy", "Creative", "Curious", "Diamond", "Ditsy", "Dot", "Dupplin", "Entrelac", "Fairisle", "Faith", "Fivestitch", "Fleurdelis", "Floral", "Foulard", "Fret", "Funny", "Garter", "Gingham", "Glencheck", "Graph", "Guilloche", "Harlequin", "Harringbone", "Hemp", "Herringbonestitch", "Honeycomb", "Honeycombstitch", "Houndstooth", "Hurdlestitch", "Ikat", "Illusion", "Intarsia", "Jute", "Kapoc", "Kind", "Kitchener", "Lace", "Lattice", "Lazy", "Linen", "Madras", "Magicknot", "Maverick", "Mohair", "Mood", "Mosaic", "Mossstitch", "Nailshead", "Nettle", "Ombre", "Optimist", "Paisley", "Perfect", "Pessimist", "Picot", "Pinstripe", "Plaid", "Polite", "Polka", "Polkadot", "Popcornstitch", "Preppy", "Purlstitch", "Quatrefoil", "Ramie", "Ramina", "Random", "Raspberrystitch", "Regency", "Ribstitch", "Scramble", "Seamless", "Seedstitch", "Sharkskin", "Shepherd", "Shy", "Silk", "Sincere", "Sisal", "Slapdash", "Stipple", "Stockinette", "Striae", "Stuffing", "Taffeta", "Tartan", "Tattercap", "Tattersail", "Tessellation", "Trefoil", "Twill", "Volatile", "Wafflestitch", "Watercolor", "Windowpane", "Wool", "Wreath", "Yarnball", "Yarnover", "Zigzag"];
|
|
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);
|
|
}
|