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

lolFaeFawnNames.js (2412B)


      1 var nm1 = ["Ab", "Abel", "Abell", "Acal", "Acanth", "Acon", "Adin", "Agast", "Al", "Alc", "All", "Aln", "Ambr", "Anem", "Ang", "Angel", "Aral", "Aren", "Aron", "Asar", "Ast", "Begon", "Bell", "Bellad", "Bet", "Bumell", "Calad", "Calend", "Cann", "Cedr", "Clem", "Cleom", "Clov", "Cosm", "Dahl", "Daphn", "Dianth", "Dindl", "Dion", "Eleagn", "Elym", "Eranth", "Erem", "Fern", "Gal", "Gall", "Gard", "Ger", "Geran", "Glor", "Gordon", "Helen", "Hibisc", "Holl", "Hydr", "Il", "Ipom", "Iv", "Junip", "Laur", "Lav", "Lavend", "Lil", "Lill", "Lot", "Lott", "Lyon", "Mal", "Mel", "Mell", "Menth", "Mill", "Min", "Molin", "Moss", "Ner", "Nyss", "Papav", "Pell", "Pepp", "Pers", "Prim", "Primul", "Pyrr", "Rhex", "Ros", "Rosem", "Russ", "Saffr", "Scill", "Soph", "Sorr", "Stell", "Tass", "Thal", "Thym", "Tul", "Valer", "Veron", "Viol", "Zinn"];
      2 var nm2 = ["aac", "ael", "am", "an", "ance", "ary", "as", "avan", "en", "ence", "er", "ert", "eson", "ey", "iah", "iam", "ian", "ick", "ien", "in", "iot", "isson", "ius", "ob", "on", "ony", "or", "ore", "ovan", "ua", "uel", "ur"];
      3 var nm3 = ["a", "ah", "ai", "ail", "andra", "antha", "e", "ea", "ecca", "ee", "eine", "elle", "enne", "ett", "ette", "i", "ia", "ianne", "ie", "ielle", "ienne", "illa", "in", "inn", "inth", "intha", "iss", "issa", "or", "ore", "y", "yn"];
      4 
      5 function nameGen(type) {
      6     var tp = type;
      7     var br = "";
      8     var element = document.createElement("div");
      9     element.setAttribute("id", "result");
     10     for (i = 0; i < 10; i++) {
     11         if (tp === 1) {
     12             nameFem();
     13             while (nMs === "") {
     14                 nameFem();
     15             }
     16         } else {
     17             nameMas();
     18             while (nMs === "") {
     19                 nameMas();
     20             }
     21         }
     22         br = document.createElement('br');
     23         element.appendChild(document.createTextNode(nMs));
     24         element.appendChild(br);
     25     }
     26     if (document.getElementById("result")) {
     27         document.getElementById("placeholder").removeChild(document.getElementById("result"));
     28     }
     29     document.getElementById("placeholder").appendChild(element);
     30 }
     31 
     32 function nameMas() {
     33     rnd = Math.random() * nm1.length | 0;
     34     rnd2 = Math.random() * nm2.length | 0;
     35     nMs = nm1[rnd] + nm2[rnd2];
     36     testSwear(nMs);
     37 }
     38 
     39 function nameFem() {
     40     rnd = Math.random() * nm1.length | 0;
     41     rnd2 = Math.random() * nm3.length | 0;
     42     nMs = nm1[rnd] + nm3[rnd2];
     43     testSwear(nMs);
     44 }