diff --git a/updateTranslations.js b/updateTranslations.js index 2a1006d..ebe73b7 100644 --- a/updateTranslations.js +++ b/updateTranslations.js @@ -1,10 +1,10 @@ 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) { const translations = JSON.parse(response); - document.querySelectorAll(".languageText").forEach(element => { + document.querySelectorAll(".translationText").forEach(element => { element.textContent = translations[element.id.replace("Text", "")]; }); @@ -28,6 +28,6 @@ function updateTranslations(response) { } }); // Show elements again - document.querySelectorAll(".languageText, .romanizationText").forEach(element => element.style.visibility = 'visible') + document.querySelectorAll(".translationText, .romanizationText").forEach(element => element.style.visibility = 'visible') }); }