From f98da2696d76100123ebe8027377526cc4f8abe5 Mon Sep 17 00:00:00 2001 From: Luna <3282295753@qq.com> Date: Thu, 8 Dec 2022 14:45:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DBug-504:=E9=AB=98=E4=BA=AE?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/static/js/highlight.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/static/js/highlight.js b/app/static/js/highlight.js index 1003918..5c3d5f4 100644 --- a/app/static/js/highlight.js +++ b/app/static/js/highlight.js @@ -22,7 +22,7 @@ function getWord() { function highLight() { if (!isHighlight) return; - let articleContent = document.getElementById("article").innerText; + let articleContent = document.getElementById("text-content").innerText; let pickedWords = document.getElementById("selected-words"); // words picked to the text area let dictionaryWords = document.getElementById("selected-words2"); // words appearing in the user's new words list let allWords = pickedWords.value + " " + dictionaryWords.value; @@ -34,11 +34,11 @@ function highLight() { articleContent = articleContent.replace(new RegExp("\\s"+list[i]+"\\s", "g"), " " + list[i] + " "); } } - document.getElementById("article").innerHTML = articleContent; + document.getElementById("text-content").innerHTML = articleContent; } function cancelHighlighting() { - let articleContent = document.getElementById("article").innerText; + let articleContent = document.getElementById("text-content").innerText; let pickedWords = document.getElementById("selected-words"); const dictionaryWords = document.getElementById("selected-words2"); const list = pickedWords.value.split(" "); @@ -60,7 +60,7 @@ function cancelHighlighting() { } } } - document.getElementById("article").innerHTML = articleContent; + document.getElementById("text-content").innerHTML = articleContent; } function fillInWord() {