From 2d810bb6617f46530a7bf0b3db26ef30668174a9 Mon Sep 17 00:00:00 2001 From: Aadhavan Srinivasan Date: Tue, 18 Mar 2025 15:34:46 -0400 Subject: [PATCH] Updated references to classname --- updateTranslations.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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') }); }