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

lolTreantNames.js (1297B)


      1 var nm1 = ["", "b", "d", "h", "k", "l", "m", "n", "r", "s", "t", "x", "z"];
      2 var nm2 = ["ao", "ai", "ua", "iu", "ia", "a", "a", "e", "i", "o", "o", "u", "u"];
      3 var nm3 = ["d", "f", "g", "h", "k", "x", "y", "z"];
      4 var nm4 = ["an", "un", "en", "in", "ing", "ong", "ui", "ua", "ai", "ei", "ao", "iu", "a", "i", "ui", "ua", "ai", "ei", "ao", "iu", "a", "i", "a", "i", "a", "i"];
      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         nameMas();
     13         while (nMs === "") {
     14             nameMas();
     15         }
     16         br = document.createElement('br');
     17         element.appendChild(document.createTextNode(nMs));
     18         element.appendChild(br);
     19     }
     20     if (document.getElementById("result")) {
     21         document.getElementById("placeholder").removeChild(document.getElementById("result"));
     22     }
     23     document.getElementById("placeholder").appendChild(element);
     24 }
     25 
     26 function nameMas() {
     27     rnd = Math.random() * nm1.length | 0;
     28     rnd2 = Math.random() * nm2.length | 0;
     29     rnd3 = Math.random() * nm3.length | 0;
     30     rnd4 = Math.random() * nm4.length | 0;
     31     nMs = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm4[rnd4];
     32     testSwear(nMs);
     33 }