diff --git a/app/static/js/nopaque.analyse_corpus.js b/app/static/js/nopaque.analyse_corpus.js index 7bdc77ca..71ecaf06 100644 --- a/app/static/js/nopaque.analyse_corpus.js +++ b/app/static/js/nopaque.analyse_corpus.js @@ -111,14 +111,11 @@ function showMatchContext(response) { let partElement let token; let tokenElement; + let tokenElements; console.log("###### match_context ######"); console.log("Incoming data:", contextData); expertModeSwitchElement = document.getElementById("display-options-form-expert_mode"); contextResultsElement = document.getElementById("context-results"); - contextModalLoading = document.getElementById("context-modal-loading"); - contextModalLoading.classList.add("hide"); - contextModalReady = document.getElementById("context-modal-ready"); - contextModalReady.classList.remove("hide"); if (contextData.cpos_ranges == true) { // python range like function from MDN https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from#Sequence_generator_(range) @@ -149,7 +146,7 @@ function showMatchContext(response) { contextResultsElement.append(partElement); } if (expertModeSwitchElement.checked) { - let tokenElements = partElement.getElementsByClassName("token"); + tokenElements = partElement.getElementsByClassName("token"); expertModeOn(tokenElements, contextData); } } diff --git a/app/templates/corpora/analyse_corpus.html.j2 b/app/templates/corpora/analyse_corpus.html.j2 index c4ba83c9..ed9a9d80 100644 --- a/app/templates/corpora/analyse_corpus.html.j2 +++ b/app/templates/corpora/analyse_corpus.html.j2 @@ -199,12 +199,7 @@