From ae1ed19b7d8713c13e44d696d414bc5b075ad556 Mon Sep 17 00:00:00 2001 From: sgmklp <2394501736@qq.com> Date: Sun, 16 Oct 2022 00:00:39 +0800 Subject: [PATCH] suppost only show the translation to result --- javascript/tagAutocomplete.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/javascript/tagAutocomplete.js b/javascript/tagAutocomplete.js index f4b1269..7ad0baa 100644 --- a/javascript/tagAutocomplete.js +++ b/javascript/tagAutocomplete.js @@ -302,9 +302,15 @@ function addResultsToList(textArea, results, tagword) { for (let i = 0; i < results.length; i++) { let result = results[i]; let li = document.createElement("li"); - li.textContent = result[0]; + + //suppost only show the translation to result if (result[2]) { - li.textContent += " >> " + result[2]; + li.textContent = result[2]; + if (!acConfig.onlyShowTranslation) { + li.textContent += " >> " + result[0]; + } + } else { + li.textContent = result[0]; } // Wildcards & Embeds have no tag type