offline-fantasy-name-generators

Offline version of www.fantasynamegenerators.com
git clone https://git.neptards.moe/neptards/offline-fantasy-name-generators.git
Log | Files | Refs | README

haloMgalekgoloNames.js (2331B)


      1 var nm1 = ["b", "d", "f", "g", "h", "k", "l", "m", "n", "p", "r", "s", "t", "w", "x", "y", "", "", "", "", "", "", "", "", ""];
      2 var nm2 = ["a", "e", "u", "i", "o"];
      3 var nm3 = ["b", "d", "f", "g", "h", "k", "l", "m", "n", "p", "r", "s", "t", "w", "x", "y"];
      4 var nm4 = ["b", "d", "f", "g", "h", "k", "l", "m", "n", "p", "r", "s", "t", "w", "x", "y", "b", "d", "f", "g", "h", "k", "l", "m", "n", "p", "r", "s", "t", "w", "x", "y", "bn", "dn", "fn", "gn", "kn", "pn", "sn", "tn", "bm", "dm", "fm", "gm", "km", "pm", "sm", "tm", "bk", "dk", "lk", "mk", "nk", "pk", "sk", "tk", "bl", "fl", "gl", "pl", "tl", "xl", "sl", "bd", "gd", "fd", "ld", "pd", "sd", "xd", "bb", "dd", "ff", "gg", "kk", "ll", "mm", "nn", "pp", "rr", "ss", "tt", "ww", "br", "dr", "gr", "fr", "kr", "pr", "tr", "xr"];
      5 
      6 function nameGen() {
      7     $('#placeholder').css('textTransform', 'capitalize');
      8     var br = "";
      9     var element = document.createElement("div");
     10     element.setAttribute("id", "result");
     11     for (i = 0; i < 10; i++) {
     12         rnd = Math.floor(Math.random() * nm1.length);
     13         rnd2 = Math.floor(Math.random() * nm2.length);
     14         rnd3 = Math.floor(Math.random() * nm3.length);
     15         rnd4 = Math.floor(Math.random() * nm2.length);
     16         rnd5 = Math.floor(Math.random() * nm3.length);
     17         rnd6 = Math.floor(Math.random() * nm2.length);
     18         rnd7 = Math.floor(Math.random() * nm3.length);
     19         rnd8 = Math.floor(Math.random() * nm2.length);
     20         rnd9 = Math.floor(Math.random() * nm3.length);
     21         rnd10 = Math.floor(Math.random() * nm2.length);
     22         rnd11 = Math.floor(Math.random() * nm3.length);
     23         rnd12 = Math.floor(Math.random() * nm2.length);
     24         rnd13 = Math.floor(Math.random() * nm4.length);
     25         rnd14 = Math.floor(Math.random() * nm2.length);
     26         names = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm2[rnd4] + nm3[rnd5] + nm2[rnd6] + " " + nm3[rnd7] + nm2[rnd8] + nm3[rnd9] + nm2[rnd10] + " " + nm3[rnd11] + nm2[rnd12] + nm4[rnd13] + nm2[rnd14];
     27         br = document.createElement('br');
     28         element.appendChild(document.createTextNode(names));
     29         element.appendChild(br);
     30     }
     31     if (document.getElementById("result")) {
     32         document.getElementById("placeholder").removeChild(document.getElementById("result"));
     33     }
     34     document.getElementById("placeholder").appendChild(element);
     35 }