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

hpWingedHorseNames.js (1638B)


      1 var nm1 = ["a", "ae", "ea", "i", "o", "", "", "", "", "", "", "", "", "", "", "", "", "", ""];
      2 var nm2 = ["ba", "bli", "blo", "bra", "bri", "cae", "ci", "cra", "cro", "da", "do", "dra", "dro", "fae", "fo", "fra", "fre", "glo", "gra", "gre", "gri", "la", "lea", "lia", "lo", "ma", "mae", "me", "mea", "nae", "nea", "nei", "ni", "phae", "phri", "pio", "po", "pri", "ra", "rae", "rea", "ro", "she", "sho", "sli", "sna", "tae", "the", "tho", "tri"];
      3 var nm3 = ["ban", "bian", "bral", "can", "cian", "ddan", "dial", "dian", "din", "hal", "han", "hian", "lan", "lian", "lin", "llan", "man", "mian", "min", "mman", "nan", "nial", "nian", "nnal", "nnan", "phal", "phian", "phion", "ppan", "ral", "ran", "rian", "rin", "rran", "sal", "san", "sin", "ssin", "stral", "tan", "thian", "tian", "tin", "tral", "xal", "xan", "xian", "xxin"];
      4 
      5 function nameGen(type) {
      6     $('#placeholder').css('textTransform', 'capitalize');
      7     var tp = type;
      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         names = nm1[rnd] + nm2[rnd2] + nm3[rnd3];
     16         br = document.createElement('br');
     17         element.appendChild(document.createTextNode(names));
     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 }