Updated references to classname

master
Aadhavan Srinivasan 2 weeks ago
parent cf5b2e40a0
commit 2d810bb661

@ -1,10 +1,10 @@
function hideText(request) { function hideText(request) {
document.querySelectorAll(".languageText, .romanizationText").forEach(element => element.style.visibility = 'hidden') document.querySelectorAll(".translationText, .romanizationText").forEach(element => element.style.visibility = 'hidden')
} }
function updateTranslations(response) { function updateTranslations(response) {
const translations = JSON.parse(response); const translations = JSON.parse(response);
document.querySelectorAll(".languageText").forEach(element => { document.querySelectorAll(".translationText").forEach(element => {
element.textContent = translations[element.id.replace("Text", "")]; element.textContent = translations[element.id.replace("Text", "")];
}); });
@ -28,6 +28,6 @@ function updateTranslations(response) {
} }
}); });
// Show elements again // Show elements again
document.querySelectorAll(".languageText, .romanizationText").forEach(element => element.style.visibility = 'visible') document.querySelectorAll(".translationText, .romanizationText").forEach(element => element.style.visibility = 'visible')
}); });
} }

Loading…
Cancel
Save