From 8b27ddf5d2adb5c39caf17d164223e0864acfe2f Mon Sep 17 00:00:00 2001 From: Stephan Porada Date: Wed, 15 Apr 2020 15:11:25 +0200 Subject: [PATCH] fix --- app/static/js/nopaque.lists.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/static/js/nopaque.lists.js b/app/static/js/nopaque.lists.js index 73be18ec..7fbfa558 100644 --- a/app/static/js/nopaque.lists.js +++ b/app/static/js/nopaque.lists.js @@ -177,7 +177,7 @@ class ResultsList extends List { ); } - HTMLTStroElement(htmlStr) { + HTMLTStrToElement(htmlStr) { // https://stackoverflow.com/questions/494143/creating-a-new-dom-element-from-an-html-string-using-built-in-dom-methods-or-pro/35385518#35385518 let template = document.createElement("template"); htmlStr = htmlStr.trim(); @@ -229,7 +229,7 @@ class ResultsList extends List { `data-cpos="${cpos}">` + `${token.word}` + ``; - tokenHTMlElement = this.HTMLTStroElement(htmlTokenStr) + tokenHTMlElement = this.HTMLTStrToElement(htmlTokenStr) tokenHTMLArray.push(tokenHTMlElement); } for (let cpos of c) { @@ -241,7 +241,7 @@ class ResultsList extends List { `style="text-decoration-line: underline;">` + `${token.word}` + ``; - tokenHTMlElement = this.HTMLTStroElement(htmlTokenStr) + tokenHTMlElement = this.HTMLTStrToElement(htmlTokenStr) tokenHTMLArray.push(tokenHTMlElement); } for (let cpos of rc) { @@ -252,7 +252,7 @@ class ResultsList extends List { `data-cpos="${cpos}">` + `${token.word}` + ``; - tokenHTMlElement = this.HTMLTStroElement(htmlTokenStr) + tokenHTMlElement = this.HTMLTStrToElement(htmlTokenStr) tokenHTMLArray.push(tokenHTMlElement); } console.log(tokenHTMLArray); @@ -260,8 +260,8 @@ class ResultsList extends List { partElement = document.createElement("p"); for (let sId of uniqueS) { - let htmlSentence = `
`; - let sentenceElement = this.HTMLTStroElement(htmlSentence); + let htmlSentence = `
`; + let sentenceElement = this.HTMLTStrToElement(htmlSentence); for (let tokenElement of tokenHTMLArray) { if (tokenElement.dataset.sid == sId) { sentenceElement.appendChild(tokenElement);