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

destinyFallenNames.js (1564B)


      1 var nm1 = ["b", "br", "d", "dr", "f", "fr", "g", "gr", "k", "kr", "n", "p", "ph", "pr", "r", "s", "sk", "t", "tr", "v", "vr", "w", "y", "z"];
      2 var nm2 = ["a", "e", "i", "o", "y"];
      3 var nm3 = ["g", "gr", "k", "kl", "kn", "kr", "ks", "l", "ld", "lkr", "ltr", "lv", "lz", "p", "r", "rk", "rl", "rrh", "sg", "sgr", "sk", "skr", "str", "thr", "tk", "tr", "v", "vg", "vk", "vr"];
      4 var nm4 = ["k", "ks", "ks", "ks", "n", "r", "rk", "s", "s", "s", "sk"];
      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         if (i < 5) {
     18             names = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm2[rnd4] + nm4[rnd5];
     19         } else {
     20             rnd6 = Math.floor(Math.random() * nm2.length);
     21             names = nm2[rnd6] + nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm2[rnd4] + nm4[rnd5];
     22         }
     23         br = document.createElement('br');
     24         element.appendChild(document.createTextNode(names));
     25         element.appendChild(br);
     26     }
     27     if (document.getElementById("result")) {
     28         document.getElementById("placeholder").removeChild(document.getElementById("result"));
     29     }
     30     document.getElementById("placeholder").appendChild(element);
     31 }