chchanged badge colors, added more badges types, handled formal1 and formal2 separately

This commit is contained in:
UndeadMaelys 2022-05-06 16:55:40 +02:00
parent 6d7ae9cefd
commit cb09f7235d
3 changed files with 169 additions and 126 deletions

View File

@ -189,8 +189,8 @@ function revert_nouns(str, tbl)
str, tbl = check_morphemes(str,tbl,"lan","","genitive")
str, tbl = check_morphemes(str,tbl,"la","","possesive")
str, tbl = check_morphemes(str,tbl,"n","","plural")
str, tbl = check_morphemes(str,tbl,"lfur","","formal")
str, tbl = check_morphemes(str,tbl,"lafura","","formal")
str, tbl = check_morphemes(str,tbl,"lfur","","formal1")
str, tbl = check_morphemes(str,tbl,"lafura","","formal2")
return str, tbl
end

99
main.js
View File

@ -9,55 +9,98 @@ let currentFont = "r";
let timeout = "";
let badge_generic = "#393939"
let badge_register= "#fed100"
let badge_number = "#420690"
let badge_case = "#690420"
let badge_tense = "#00dd00"
let badge_mood = "#dd00dd"
let badge_negation = "#133337"
let quirkBadges = {
"formal1": {
"name": "Formal",
"description": "This word is used in formal or sincere settings.",
"color": badge_register,
"type": "Register",
"bending": "-lfur"
},
"formal2": {
"name": "Formal",
"description": "This word is used in formal or sincere settings.",
"color": badge_register,
"type": "Register",
"bending": "-lafura"
},
"genitive": {
"name": "Generic Possesive",
"description": "This word is describing a generic possesive relationship.",
"color": badge_case,
"type": "Case",
"bending": "-lan"
},
"possesive": {
"name": "Specific Possesive",
"description": "This word is describing a specific possesive relationship.",
"color": badge_case,
"type": "Case",
"bending": "la"
},
"plural": {
"name": "Plural",
"description": "This word is denoted as more than one",
"color": badge_number,
"type": "Number",
"bending": "n"
},
"present-tense": {
"name": "Present tense",
"description": "The word is in the present tense.",
"color": "#00dd00",
"name": "Present",
"description": "This word is in the present tense.",
"color": badge_tense,
"type": "Tense",
"bending": "ka'nya"
"bending": "ku → ka'nya"
},
"past-tense": {
"name": "Past tense",
"description": "The word is in the past tense.",
"color": "#dd00dd",
"name": "Past",
"description": "This word is in the past tense.",
"color": badge_tense,
"type": "Tense",
"bending": "kome"
"bending": "ku → kome"
},
"volitional-mood": {
"name": "Feeling mood",
"description": "A feeling,",
"color": "#dd00dd",
"name": "Feeling",
"description": "This word expresses a feeling or craving mood.",
"color": badge_mood,
"type": "Mood",
"bending": "pash"
"bending": "-pash"
},
"imperative-mood": {
"name": "Imperative mood",
"description": "Commanding mood.",
"color": "#dd0000",
"name": "Imperative",
"description": "This word expresses a imperative mood.",
"color": badge_mood,
"type": "Mood",
"bending": "dash"
"bending": "-dash"
},
"shy-mood": {
"name": "Shy mood",
"description": "Shy mood.",
"color": "#dddd00",
"name": "Shy",
"description": "This word expresses a shy mood..",
"color": badge_mood,
"type": "Mood",
"bending": "bash"
"bending": "-bash"
},
"threat-mood": {
"name": "Threat mood",
"description": "Threat mood.",
"color": "#00dddd",
"name": "Threat",
"description": "This word expresses a threatening mood..",
"color": badge_mood,
"type": "Mood",
"bending": "tash"
"bending": "-tash"
},
"negated": {
"name": "Negated",
"description": "The word is negated.",
"color": "#7777dd",
"name": "Negative",
"description": "The word is expressing a negated meaning.",
"color": badge_negation,
"type": "Negation",
"bending": "fa"
"bending": "-fa-"
},
"unknown-tag": {
"name": "Unknown tag",

192
test.html
View File

@ -63,8 +63,8 @@ LU'NYA
<span
class="clickable"
onclick="showPopup('balfur','ba','formal')"
onmouseover="checkHover('balfur','ba',this,'formal')"
onclick="showPopup('balfur','ba','formal1')"
onmouseover="checkHover('balfur','ba',this,'formal1')"
onmouseout="clearHover()">
balfur
</span>
@ -121,8 +121,8 @@ LU'NYA
<span
class="clickable"
onclick="showPopup('','ba','formal')"
onmouseover="checkHover('','ba',this,'formal')"
onclick="showPopup('','ba','formal1')"
onmouseover="checkHover('','ba',this,'formal1')"
onmouseout="clearHover()">

</span>
@ -570,8 +570,8 @@ LU'NYA
<p class="convo-roman">
<span
class="clickable"
onclick="showPopup('relfur','re','formal')"
onmouseover="checkHover('relfur','re',this,'formal')"
onclick="showPopup('relfur','re','formal1')"
onmouseover="checkHover('relfur','re',this,'formal1')"
onmouseout="clearHover()">
relfur
</span>
@ -618,8 +618,8 @@ LU'NYA
<span
class="clickable"
onclick="showPopup('relfur','re','formal')"
onmouseover="checkHover('relfur','re',this,'formal')"
onclick="showPopup('relfur','re','formal1')"
onmouseover="checkHover('relfur','re',this,'formal1')"
onmouseout="clearHover()">
relfur
</span>
@ -692,8 +692,8 @@ LU'NYA
<p class="convo-heonian">
<span
class="clickable"
onclick="showPopup('','re','formal')"
onmouseover="checkHover('','re',this,'formal')"
onclick="showPopup('','re','formal1')"
onmouseover="checkHover('','re',this,'formal1')"
onmouseout="clearHover()">

</span>
@ -740,8 +740,8 @@ LU'NYA
<span
class="clickable"
onclick="showPopup('','re','formal')"
onmouseover="checkHover('','re',this,'formal')"
onclick="showPopup('','re','formal1')"
onmouseover="checkHover('','re',this,'formal1')"
onmouseout="clearHover()">

</span>
@ -852,8 +852,8 @@ ESH'NYUI
<p class="convo-roman">
<span
class="clickable"
onclick="showPopup('balfur','ba','formal')"
onmouseover="checkHover('balfur','ba',this,'formal')"
onclick="showPopup('balfur','ba','formal1')"
onmouseover="checkHover('balfur','ba',this,'formal1')"
onmouseout="clearHover()">
balfur
</span>
@ -902,8 +902,8 @@ ESH'NYUI
<p class="convo-heonian">
<span
class="clickable"
onclick="showPopup('','ba','formal')"
onmouseover="checkHover('','ba',this,'formal')"
onclick="showPopup('','ba','formal1')"
onmouseover="checkHover('','ba',this,'formal1')"
onmouseout="clearHover()">

</span>
@ -1006,8 +1006,8 @@ LU'NYA
<p class="convo-roman">
<span
class="clickable"
onclick="showPopup('relfurla','re','possesive formal')"
onmouseover="checkHover('relfurla','re',this,'possesive formal')"
onclick="showPopup('relfurla','re','possesive formal1')"
onmouseover="checkHover('relfurla','re',this,'possesive formal1')"
onmouseout="clearHover()">
relfurla
</span>
@ -1072,8 +1072,8 @@ LU'NYA
<p class="convo-heonian">
<span
class="clickable"
onclick="showPopup('','re','possesive formal')"
onmouseover="checkHover('','re',this,'possesive formal')"
onclick="showPopup('','re','possesive formal1')"
onmouseover="checkHover('','re',this,'possesive formal1')"
onmouseout="clearHover()">

</span>
@ -1138,8 +1138,8 @@ LU'NYA
<p class="convo-roman">
<span
class="clickable"
onclick="showPopup('balfurla','ba','possesive formal')"
onmouseover="checkHover('balfurla','ba',this,'possesive formal')"
onclick="showPopup('balfurla','ba','possesive formal1')"
onmouseover="checkHover('balfurla','ba',this,'possesive formal1')"
onmouseout="clearHover()">
balfurla
</span>
@ -1164,8 +1164,8 @@ LU'NYA
<p class="convo-heonian">
<span
class="clickable"
onclick="showPopup('','ba','possesive formal')"
onmouseover="checkHover('','ba',this,'possesive formal')"
onclick="showPopup('','ba','possesive formal1')"
onmouseover="checkHover('','ba',this,'possesive formal1')"
onmouseout="clearHover()">

</span>
@ -1208,8 +1208,8 @@ ESH'NYUI
<p class="convo-roman">
<span
class="clickable"
onclick="showPopup('relfurla','re','possesive formal')"
onmouseover="checkHover('relfurla','re',this,'possesive formal')"
onclick="showPopup('relfurla','re','possesive formal1')"
onmouseover="checkHover('relfurla','re',this,'possesive formal1')"
onmouseout="clearHover()">
relfurla
</span>
@ -1282,8 +1282,8 @@ ESH'NYUI
<p class="convo-heonian">
<span
class="clickable"
onclick="showPopup('','re','possesive formal')"
onmouseover="checkHover('','re',this,'possesive formal')"
onclick="showPopup('','re','possesive formal1')"
onmouseover="checkHover('','re',this,'possesive formal1')"
onmouseout="clearHover()">

</span>
@ -1356,8 +1356,8 @@ ESH'NYUI
<p class="convo-roman">
<span
class="clickable"
onclick="showPopup('relfur','re','formal')"
onmouseover="checkHover('relfur','re',this,'formal')"
onclick="showPopup('relfur','re','formal1')"
onmouseover="checkHover('relfur','re',this,'formal1')"
onmouseout="clearHover()">
relfur
</span>
@ -1406,8 +1406,8 @@ ESH'NYUI
<p class="convo-heonian">
<span
class="clickable"
onclick="showPopup('','re','formal')"
onmouseover="checkHover('','re',this,'formal')"
onclick="showPopup('','re','formal1')"
onmouseover="checkHover('','re',this,'formal1')"
onmouseout="clearHover()">

</span>
@ -1584,8 +1584,8 @@ ESH'NYUI
<span
class="clickable"
onclick="showPopup('rerenlafura','reren','formal')"
onmouseover="checkHover('rerenlafura','reren',this,'formal')"
onclick="showPopup('rerenlafura','reren','formal2')"
onmouseover="checkHover('rerenlafura','reren',this,'formal2')"
onmouseout="clearHover()">
rerenlafura
</span>
@ -1626,8 +1626,8 @@ ESH'NYUI
<span
class="clickable"
onclick="showPopup('','reren','formal')"
onmouseover="checkHover('','reren',this,'formal')"
onclick="showPopup('','reren','formal2')"
onmouseover="checkHover('','reren',this,'formal2')"
onmouseout="clearHover()">

</span>
@ -1660,8 +1660,8 @@ ESH'NYUI
<p class="convo-roman">
<span
class="clickable"
onclick="showPopup('relfur','re','formal')"
onmouseover="checkHover('relfur','re',this,'formal')"
onclick="showPopup('relfur','re','formal1')"
onmouseover="checkHover('relfur','re',this,'formal1')"
onmouseout="clearHover()">
relfur
</span>
@ -1694,8 +1694,8 @@ ESH'NYUI
<p class="convo-heonian">
<span
class="clickable"
onclick="showPopup('','re','formal')"
onmouseover="checkHover('','re',this,'formal')"
onclick="showPopup('','re','formal1')"
onmouseover="checkHover('','re',this,'formal1')"
onmouseout="clearHover()">

</span>
@ -1754,8 +1754,8 @@ LU'NYA
<span
class="clickable"
onclick="showPopup('relfur','re','formal')"
onmouseover="checkHover('relfur','re',this,'formal')"
onclick="showPopup('relfur','re','formal1')"
onmouseover="checkHover('relfur','re',this,'formal1')"
onmouseout="clearHover()">
relfur
</span>
@ -1788,8 +1788,8 @@ LU'NYA
<span
class="clickable"
onclick="showPopup('','re','formal')"
onmouseover="checkHover('','re',this,'formal')"
onclick="showPopup('','re','formal1')"
onmouseover="checkHover('','re',this,'formal1')"
onmouseout="clearHover()">

</span>
@ -1822,8 +1822,8 @@ LU'NYA
<span
class="clickable"
onclick="showPopup('babanlafura','baban','formal')"
onmouseover="checkHover('babanlafura','baban',this,'formal')"
onclick="showPopup('babanlafura','baban','formal2')"
onmouseover="checkHover('babanlafura','baban',this,'formal2')"
onmouseout="clearHover()">
babanlafura
</span>
@ -1872,8 +1872,8 @@ LU'NYA
<span
class="clickable"
onclick="showPopup('','baban','formal')"
onmouseover="checkHover('','baban',this,'formal')"
onclick="showPopup('','baban','formal2')"
onmouseover="checkHover('','baban',this,'formal2')"
onmouseout="clearHover()">

</span>
@ -1940,8 +1940,8 @@ ESH'NYUI
<span
class="clickable"
onclick="showPopup('relfur','re','formal')"
onmouseover="checkHover('relfur','re',this,'formal')"
onclick="showPopup('relfur','re','formal1')"
onmouseover="checkHover('relfur','re',this,'formal1')"
onmouseout="clearHover()">
relfur
</span>
@ -2014,8 +2014,8 @@ ESH'NYUI
<span
class="clickable"
onclick="showPopup('','re','formal')"
onmouseover="checkHover('','re',this,'formal')"
onclick="showPopup('','re','formal1')"
onmouseover="checkHover('','re',this,'formal1')"
onmouseout="clearHover()">

</span>
@ -2080,8 +2080,8 @@ ESH'NYUI
<p class="convo-roman">
<span
class="clickable"
onclick="showPopup('relfur','re','formal')"
onmouseover="checkHover('relfur','re',this,'formal')"
onclick="showPopup('relfur','re','formal1')"
onmouseover="checkHover('relfur','re',this,'formal1')"
onmouseout="clearHover()">
relfur
</span>
@ -2138,8 +2138,8 @@ ESH'NYUI
<p class="convo-heonian">
<span
class="clickable"
onclick="showPopup('','re','formal')"
onmouseover="checkHover('','re',this,'formal')"
onclick="showPopup('','re','formal1')"
onmouseover="checkHover('','re',this,'formal1')"
onmouseout="clearHover()">

</span>
@ -2196,8 +2196,8 @@ ESH'NYUI
<p class="convo-roman">
<span
class="clickable"
onclick="showPopup('relfur','re','formal')"
onmouseover="checkHover('relfur','re',this,'formal')"
onclick="showPopup('relfur','re','formal1')"
onmouseover="checkHover('relfur','re',this,'formal1')"
onmouseout="clearHover()">
relfur
</span>
@ -2230,8 +2230,8 @@ ESH'NYUI
<p class="convo-heonian">
<span
class="clickable"
onclick="showPopup('','re','formal')"
onmouseover="checkHover('','re',this,'formal')"
onclick="showPopup('','re','formal1')"
onmouseover="checkHover('','re',this,'formal1')"
onmouseout="clearHover()">

</span>
@ -2290,8 +2290,8 @@ LU'NYA
<span
class="clickable"
onclick="showPopup('balfur','ba','formal')"
onmouseover="checkHover('balfur','ba',this,'formal')"
onclick="showPopup('balfur','ba','formal1')"
onmouseover="checkHover('balfur','ba',this,'formal1')"
onmouseout="clearHover()">
balfur
</span>
@ -2332,8 +2332,8 @@ LU'NYA
<span
class="clickable"
onclick="showPopup('','ba','formal')"
onmouseover="checkHover('','ba',this,'formal')"
onclick="showPopup('','ba','formal1')"
onmouseover="checkHover('','ba',this,'formal1')"
onmouseout="clearHover()">

</span>
@ -2366,8 +2366,8 @@ LU'NYA
<p class="convo-roman">
<span
class="clickable"
onclick="showPopup('balfur','ba','formal')"
onmouseover="checkHover('balfur','ba',this,'formal')"
onclick="showPopup('balfur','ba','formal1')"
onmouseover="checkHover('balfur','ba',this,'formal1')"
onmouseout="clearHover()">
balfur
</span>
@ -2440,8 +2440,8 @@ LU'NYA
<p class="convo-heonian">
<span
class="clickable"
onclick="showPopup('','ba','formal')"
onmouseover="checkHover('','ba',this,'formal')"
onclick="showPopup('','ba','formal1')"
onmouseover="checkHover('','ba',this,'formal1')"
onmouseout="clearHover()">

</span>
@ -2540,8 +2540,8 @@ ESH'NYUI
<span
class="clickable"
onclick="showPopup('balfur','ba','formal')"
onmouseover="checkHover('balfur','ba',this,'formal')"
onclick="showPopup('balfur','ba','formal1')"
onmouseover="checkHover('balfur','ba',this,'formal1')"
onmouseout="clearHover()">
balfur
</span>
@ -2574,8 +2574,8 @@ ESH'NYUI
<span
class="clickable"
onclick="showPopup('','ba','formal')"
onmouseover="checkHover('','ba',this,'formal')"
onclick="showPopup('','ba','formal1')"
onmouseover="checkHover('','ba',this,'formal1')"
onmouseout="clearHover()">

</span>
@ -2620,8 +2620,8 @@ ESH'NYUI
<p class="convo-roman">
<span
class="clickable"
onclick="showPopup('relfur','re','formal')"
onmouseover="checkHover('relfur','re',this,'formal')"
onclick="showPopup('relfur','re','formal1')"
onmouseover="checkHover('relfur','re',this,'formal1')"
onmouseout="clearHover()">
relfur
</span>
@ -2652,8 +2652,8 @@ ESH'NYUI
<span
class="clickable"
onclick="showPopup('balfur','ba','formal')"
onmouseover="checkHover('balfur','ba',this,'formal')"
onclick="showPopup('balfur','ba','formal1')"
onmouseover="checkHover('balfur','ba',this,'formal1')"
onmouseout="clearHover()">
balfur
</span>
@ -2686,8 +2686,8 @@ ESH'NYUI
<p class="convo-heonian">
<span
class="clickable"
onclick="showPopup('','re','formal')"
onmouseover="checkHover('','re',this,'formal')"
onclick="showPopup('','re','formal1')"
onmouseover="checkHover('','re',this,'formal1')"
onmouseout="clearHover()">

</span>
@ -2718,8 +2718,8 @@ ESH'NYUI
<span
class="clickable"
onclick="showPopup('','ba','formal')"
onmouseover="checkHover('','ba',this,'formal')"
onclick="showPopup('','ba','formal1')"
onmouseover="checkHover('','ba',this,'formal1')"
onmouseout="clearHover()">

</span>
@ -2770,8 +2770,8 @@ LU'NYA
<p class="convo-roman">
<span
class="clickable"
onclick="showPopup('relfur','re','formal')"
onmouseover="checkHover('relfur','re',this,'formal')"
onclick="showPopup('relfur','re','formal1')"
onmouseover="checkHover('relfur','re',this,'formal1')"
onmouseout="clearHover()">
relfur
</span>
@ -2812,8 +2812,8 @@ LU'NYA
<p class="convo-heonian">
<span
class="clickable"
onclick="showPopup('','re','formal')"
onmouseover="checkHover('','re',this,'formal')"
onclick="showPopup('','re','formal1')"
onmouseover="checkHover('','re',this,'formal1')"
onmouseout="clearHover()">

</span>
@ -3058,8 +3058,8 @@ LU'NYA
<p class="convo-roman">
<span
class="clickable"
onclick="showPopup('relfur','re','formal')"
onmouseover="checkHover('relfur','re',this,'formal')"
onclick="showPopup('relfur','re','formal1')"
onmouseover="checkHover('relfur','re',this,'formal1')"
onmouseout="clearHover()">
relfur
</span>
@ -3092,8 +3092,8 @@ LU'NYA
<p class="convo-heonian">
<span
class="clickable"
onclick="showPopup('','re','formal')"
onmouseover="checkHover('','re',this,'formal')"
onclick="showPopup('','re','formal1')"
onmouseover="checkHover('','re',this,'formal1')"
onmouseout="clearHover()">

</span>
@ -3278,8 +3278,8 @@ LU'NYA
<span
class="clickable"
onclick="showPopup('relfur','re','formal')"
onmouseover="checkHover('relfur','re',this,'formal')"
onclick="showPopup('relfur','re','formal1')"
onmouseover="checkHover('relfur','re',this,'formal1')"
onmouseout="clearHover()">
relfur
</span>
@ -3336,8 +3336,8 @@ LU'NYA
<span
class="clickable"
onclick="showPopup('','re','formal')"
onmouseover="checkHover('','re',this,'formal')"
onclick="showPopup('','re','formal1')"
onmouseover="checkHover('','re',this,'formal1')"
onmouseout="clearHover()">

</span>
@ -3378,8 +3378,8 @@ LU'NYA
<p class="convo-roman">
<span
class="clickable"
onclick="showPopup('relfur','re','formal')"
onmouseover="checkHover('relfur','re',this,'formal')"
onclick="showPopup('relfur','re','formal1')"
onmouseover="checkHover('relfur','re',this,'formal1')"
onmouseout="clearHover()">
relfur
</span>
@ -3412,8 +3412,8 @@ LU'NYA
<p class="convo-heonian">
<span
class="clickable"
onclick="showPopup('','re','formal')"
onmouseover="checkHover('','re',this,'formal')"
onclick="showPopup('','re','formal1')"
onmouseover="checkHover('','re',this,'formal1')"
onmouseout="clearHover()">

</span>