Compare commits
2 Commits
f861b73846
...
f20c17337b
Author | SHA1 | Date | |
---|---|---|---|
f20c17337b | |||
4fece83e43 |
@@ -38,12 +38,13 @@
|
||||
fill-opacity: 0.0;
|
||||
stroke-width: 1;
|
||||
}
|
||||
.languageText {
|
||||
.languageText, .romanizationText {
|
||||
visibility: hidden;
|
||||
font-family: "Noto Sans";
|
||||
font-size:1.25em;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.language:hover ~ .languageText {
|
||||
visibility: visible;
|
||||
}
|
||||
|
@@ -17,5 +17,11 @@ function updateTranslations(response) {
|
||||
.then((data) => {
|
||||
elem.classList.toggle("loading");
|
||||
console.log(data);
|
||||
const romanizations = data;
|
||||
document.querySelectorAll(".romanizationText").forEach(element => {
|
||||
if (element.id.replace("Romanization", "") in romanizations) {
|
||||
element.textContent = "(" + romanizations[element.id.replace("Romanization", "")][0] + ")";
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user