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

destinyVexNames.js (1265B)


      1 var nm1 = ["", "", "", "", "c", "g", "h", "k", "n", "s", "t", "th", "z"];
      2 var nm2 = ["a", "e", "a", "e", "a", "e", "i", "o", "a", "e", "i", "o", "eo", "io", "y", "y", "ia", "ea"];
      3 var nm3 = ["d", "dh", "dr", "g", "gg", "gh", "gr", "k", "kh", "kk", "kr", "lg", "lk", "nk", "nr", "rg", "rk", "sk", "th", "tr"];
      4 var nm4 = ["m", "n", "s", "t", "x"];
      5 var br = "";
      6 
      7 function nameGen() {
      8     $('#placeholder').css('textTransform', 'capitalize');
      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() * nm4.length);
     17         names = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm2[rnd4] + nm4[rnd5];
     18         br = document.createElement('br');
     19         element.appendChild(document.createTextNode(names));
     20         element.appendChild(br);
     21     }
     22     if (document.getElementById("result")) {
     23         document.getElementById("placeholder").removeChild(document.getElementById("result"));
     24     }
     25     document.getElementById("placeholder").appendChild(element);
     26 }