motorsportRaces.js (5214B)
1 function nameGen() { 2 var nm1 = ["Annual", "Arctic", "International", "Acclaimed", "Accomplished", "Adamant", "Advanced", "Extreme", "Bold", "Classic", "Creative", "Dynamic", "Economic", "Exalted", "Exclusive", "Fearless", "Fierce", "First", "General", "Golden", "Grand", "Great", "Long", "National", "Velvet", "Nocturnal", "Nimble", "Obsidian", "Jade", "Sapphire", "Oceanic", "Original", "Parallel", "Prime", "Premium", "Radiant", "Rapid", "Swift", "Silver", "Silk", "Sanguine", "Crimson", "Super", "Supreme", "Twin", "Ultimate", "Ultra", "Ivory", "Sapphire", "Emerald", "Ruby", "Ebon", "Wild", "Solar", "Lunar"]; 3 var nm2 = ["Achiever", "Ambition", "Aspect", "Audience", "Basin", "Beach", "Beast", "Border", "Bridge", "Capital", "Celebration", "Challenge", "Classic", "Cloud", "Coast", "Cold", "Community", "Creation", "Creator", "Crew", "Crown", "Desert", "Diamond", "District", "Divide", "Downtown", "Dream", "Earth", "Enhancement", "Experience", "Field", "Foundation", "Freedom", "Harbor", "Hill", "Holiday", "Honor", "Impulse", "Independence", "Intelligence", "Invention", "Island", "Liberty", "Marsh", "Member", "Mirror", "Sunset", "Sunrise", "Mobile", "Monument", "Motion", "Mountain", "Movement", "Network", "Night", "Opportunity", "Passage", "Patriot", "Performance", "Perseverance", "Pinnacle", "Revolution", "Specialist", "Swamp", "Territory", "Thrill", "Thunder", "Tradition", "Trail", "Victory", "Voyage", "Wilderness"]; 4 var nm3 = ["Acclaimed", "Accomplished", "Achiever", "Adamant", "Advanced", "Ambition", "Annual", "Arctic", "Aspect", "Audience", "Basin", "Beach", "Beast", "Bold", "Border", "Bridge", "Capital", "Celebration", "Challenge", "Classic", "Cloud", "Coast", "Cold", "Community", "Creation", "Creative", "Creator", "Crew", "Crimson", "Crown", "Desert", "Diamond", "District", "Divide", "Downtown", "Dream", "Dynamic", "Earth", "Ebon", "Economic", "Emerald", "Enhancement", "Exalted", "Exclusive", "Experience", "Extreme", "Fearless", "Field", "Fierce", "First", "Foundation", "Freedom", "General", "Golden", "Grand", "Great", "Harbor", "Hill", "Holiday", "Honor", "Impulse", "Independence", "Intelligence", "International", "Invention", "Island", "Ivory", "Jade", "Liberty", "Long", "Lunar", "Marsh", "Member", "Mirror", "Mobile", "Monument", "Motion", "Mountain", "Movement", "National", "Network", "Night", "Nimble", "Nocturnal", "Obsidian", "Oceanic", "Opportunity", "Original", "Parallel", "Passage", "Patriot", "Performance", "Perseverance", "Pinnacle", "Premium", "Prime", "Radiant", "Rapid", "Revolution", "Ruby", "Sanguine", "Sapphire", "Silk", "Silver", "Solar", "Specialist", "Sunrise", "Sunset", "Super", "Supreme", "Swamp", "Swift", "Territory", "Thrill", "Thunder", "Tradition", "Trail", "Twin", "Ultimate", "Ultra", "Velvet", "Victory", "Voyage", "Wild", "Wilderness"]; 5 var nm4 = ["All Star", "All Stars", "Climb", "Cross", "Drag", "Drag Race", "Dragster", "Drift", "Drifter", "Drifting", "Elite", "Endurance", "Formula", "Full Throttle", "Hill", "Hill Climb", "Hot Rod", "Kart", "Legacy", "Mini", "Miniature", "Modified", "Motorcross", "Off Road", "Off-Road", "Outlaw", "Performance", "Pro", "Production Car", "Rally", "Rallycross", "Road Racing", "Speed", "Speedway", "Sports", "Sportscar", "Spring Car", "Sprint", "Stock", "Stock Car", "Superbike", "Supercar", "Supercross", "Superkart", "Supermodified", "Superstar", "Touring", "Touring Car", "Velocity"]; 6 var nm5 = ["Champion Series", "Championship", "Championship Series", "Cup", "Formula Masters", "Junior Championship", "Juniors", "League", "Masters", "Pro Series", "Racing Series", "Series", "Superleague", "World Championship", "World Series"]; 7 var br = ""; 8 var element = document.createElement("div"); 9 element.setAttribute("id", "result"); 10 for (i = 0; i < 10; i++) { 11 rnd4 = Math.floor(Math.random() * nm4.length); 12 rnd5 = Math.floor(Math.random() * nm5.length); 13 if (i < 3) { 14 names = "The " + nm4[rnd4] + " " + nm5[rnd5]; 15 } else if (i < 6) { 16 rnd = Math.floor(Math.random() * nm1.length); 17 names = "The " + nm1[rnd] + " " + nm4[rnd4] + " " + nm5[rnd5] 18 nm1.splice(rnd, 1); 19 } else if (i < 8) { 20 rnd = Math.floor(Math.random() * nm3.length); 21 names = "The " + nm3[rnd] + " " + nm4[rnd4] + " " + nm5[rnd5] 22 nm3.splice(rnd, 1); 23 } else { 24 rnd = Math.floor(Math.random() * nm1.length); 25 rnd2 = Math.floor(Math.random() * nm2.length); 26 while (nm1[rnd] === nm2[rnd2]) { 27 rnd2 = Math.floor(Math.random() * nm2.length); 28 } 29 names = "The " + nm1[rnd] + " " + nm2[rnd2] + " " + nm4[rnd4] + " " + nm5[rnd5] 30 nm1.splice(rnd, 1); 31 nm2.splice(rnd2, 1); 32 } 33 nm4.splice(rnd4, 1); 34 nm5.splice(rnd5, 1); 35 br = document.createElement('br'); 36 element.appendChild(document.createTextNode(names)); 37 element.appendChild(br); 38 } 39 if (document.getElementById("result")) { 40 document.getElementById("placeholder").removeChild(document.getElementById("result")); 41 } 42 document.getElementById("placeholder").appendChild(element); 43 }