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.
		
		
		
		
		
			
		
			
				
	
	
		
			79 lines
		
	
	
		
			4.8 KiB
		
	
	
	
		
			JavaScript
		
	
			
		
		
	
	
			79 lines
		
	
	
		
			4.8 KiB
		
	
	
	
		
			JavaScript
		
	
| var nm1 = ["1", "1", "1", "2", "2", "2", "2", "3", "3", "3", "4", "4", "5", "6"];
 | |
| var nm2 = ["A", "E", "I", "O", "U", "Y", "B", "C", "D", "F", "G", "H", "J", "K", "L", "M", "N", "P", "Q", "R", "S", "T", "V", "W", "X", "Z"];
 | |
| var nm3 = ["1", "2", "3", "4", "A", "E", "I", "O", "U", "Y", "B", "C", "D", "F", "G", "H", "J", "K", "L", "M", "N", "P", "Q", "R", "S", "T", "V", "W", "X", "Z"];
 | |
| var nm4 = ["A", "A's", "Adventure", "Ambition", "Black", "Boys", "Craze", "Design", "Desire", "Dream", "Era", "Family", "Friends", "Fusion", "Generation", "Genesis", "Girls", "Guys", "Infinity", "Mania", "Monsters", "Party", "Passion", "Pink", "Project", "Soul", "Super", "Unlimited", "Vision"];
 | |
| 
 | |
| function nameGen() {
 | |
|     var nm5 = ["Achievers", "Adventure", "Aftermath", "Alternate Dimension", "Ambition", "Analysis", "Apparatus", "Archangel", "Beyond Infinity", "Blue Moon", "Boy Friends", "Bravery", "Cascade", "Celebration", "Chain Reaction", "Chaos", "Charity", "Chosen Ones", "Clockwork", "Clover", "Courage", "Crown Jewel", "Data", "Deep Breath", "Delight", "Destiny", "Diamond", "Double Trouble", "Dreamers", "Dreamscape", "Echo", "Elegance", "Embrace", "Emphasis", "Enigma", "Eternity", "Feeling", "First Choice", "First Division", "First Kiss", "First Memory", "First Romance", "First Snow", "Flame", "Fluke", "Fortune", "Foundation", "Full Moon", "Generosity", "Genesis", "Gift", "Girl Friends", "Happiness", "Harmony", "Highlight", "Ice Cubes", "Imagination", "Imagine", "Impact", "Impulse", "Infinity", "Initiative", "Inside", "Invention", "Invitation", "Iron", "Island Life", "Jelly Fish", "Jewel", "Journey", "Ladybug", "Liberty", "Life Journey", "Life Light", "Life Three", "Life Tree", "Lightning", "Limitless", "Love", "Love Machine", "Loyalty", "Mask", "Masked Ball", "Maybe", "Memory", "Mercy", "Metal Petal", "Midnight", "Motive", "National Treasure", "Network", "Next Dimension", "Night Owl", "No Bounds", "No Regrets", "Omen", "One Chance", "Opportunity", "Palace", "Passion", "Peace", "Peace Blossom", "Petal", "Picture Perfect", "Playground", "Plume", "Priority", "Promise", "Question Mark", "Quicksand", "Redemption", "Resonance", "Revolution", "Riddle", "Romance", "Royal Flush", "Scarecrow", "Secret", "Shadows", "Shooting Star", "Signature", "Smile", "Sparkle", "Special Delivery", "Surprise", "Sympathy", "The Dream", "Thrill Seeker", "Thunder", "Timeless", "Tomorrow", "Trickshot", "Variety", "Victory", "Virtual Reality", "Voyage", "Wisdom", "Wish", "With Love", "Wonder", "X-Change", "Youth Fountain"];
 | |
|     var br = "";
 | |
|     var element = document.createElement("div");
 | |
|     element.setAttribute("id", "result");
 | |
|     for (i = 0; i < 10; i++) {
 | |
|         if (i < 7) {
 | |
|             nameMas();
 | |
|             while (nMs === "") {
 | |
|                 nameMas();
 | |
|             }
 | |
|             nTp = Math.random() * 3 | 0;
 | |
|             if (nTp === 0) {
 | |
|                 rnd = Math.random() * nm4.length | 0;
 | |
|                 nMs += " " + nm4[rnd]
 | |
|             }
 | |
|         } else {
 | |
|             rnd = Math.random() * nm5.length | 0;
 | |
|             nMs = nm5[rnd];
 | |
|             nm5.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);
 | |
| }
 | |
| 
 | |
| function nameMas() {
 | |
|     nTp = Math.random() * 8 | 0;
 | |
|     rnd = Math.random() * nm2.length | 0;
 | |
|     rnd2 = Math.random() * nm2.length | 0;
 | |
|     if (nTp < 2) {
 | |
|         rnd3 = Math.random() * nm1.length | 0;
 | |
|         if (nTp === 0) {
 | |
|             if (nm2[rnd2] === "S" && nm2[rnd2] === "X") {
 | |
|                 rnd2 += 1;
 | |
|             }
 | |
|             nMs = nm1[rnd3] + nm2[rnd] + nm2[rnd2];
 | |
|         } else {
 | |
|             nMs = nm2[rnd] + nm1[rnd3] + nm2[rnd2];
 | |
|         }
 | |
|     } else if (nTp < 4) {
 | |
|         rnd3 = Math.random() * nm1.length | 0;
 | |
|         if (nTp === 2) {
 | |
|             rnd4 = Math.random() * nm1.length | 0;
 | |
|             nMs = nm1[rnd3] + nm2[rnd] + nm2[rnd2] + nm1[rnd4];
 | |
|         } else {
 | |
|             rnd4 = Math.random() * nm3.length | 0;
 | |
|             nMs = nm1[rnd3] + nm2[rnd] + nm2[rnd2] + nm3[rnd4];
 | |
|         }
 | |
|     } else if (nTp < 6) {
 | |
|         rnd3 = Math.random() * nm2.length | 0;
 | |
|         nMs = nm2[rnd] + nm2[rnd2] + nm2[rnd3];
 | |
|     } else {
 | |
|         rnd3 = Math.random() * nm2.length | 0;
 | |
|         rnd4 = Math.random() * nm2.length | 0;
 | |
|         if (nTp === 6) {
 | |
|             if (rnd > 5 && rnd2 > 5 && rnd3 > 5 && rnd4 > 5) {
 | |
|                 rnd2 = Math.random() * 5 | 0;
 | |
|             }
 | |
|         } else {
 | |
|             if (rnd > 5 && rnd2 > 5 && rnd3 > 5 && rnd4 > 5) {
 | |
|                 rnd3 = Math.random() * 5 | 0;
 | |
|             }
 | |
|         }
 | |
|         nMs = nm2[rnd] + nm2[rnd2] + nm2[rnd3] + nm2[rnd4];
 | |
|     }
 | |
|     testSwear(nMs);
 | |
| }
 |