diff --git a/main.js b/main.js index 546c965..6ef83a1 100644 --- a/main.js +++ b/main.js @@ -540,7 +540,9 @@ class ResultsPageModell { if (logElementGetting) { Log('Getting right answer if correct not shown') } var results = this.GetFormResult() // getting results element var n = results[i].getElementsByTagName('i')[0].parentNode - if (n.className.includes('correct') && !n.className.includes('incorrect')) { return results[i].getElementsByTagName('i')[0].parentNode.innerText } else { return '' } + if (n.className.includes('correct') && !n.className.includes('incorrect')) { + return results[i].getElementsByTagName('i')[0].parentNode.innerText + } } GetFormCFOfResult (result) { @@ -560,6 +562,15 @@ class ResultsPageModell { return this.GetFormCFOfResult(results[i]).getElementsByTagName('img') } + GetOnlyImageQuestionResult (i) { + console.log('############################################################') + console.log(i) + const results = this.GetFormResult() // getting results element + const n = results[i] + console.log(n) + console.log('############################################################') + } + // gets the question from the result page // i is the index of the question GetQuestionFromResult (i) { @@ -608,6 +619,11 @@ class ResultsPageModell { if (RPM.GetDropboxes(i).length > 0) { return RPM.GetCurrentAnswer(i) } }) + // image and text only question + fun.push(function TryGet5 (i) { + return RPM.GetOnlyImageQuestionResult(i) + }) + // if the correct answers are not shown, and the selected answer // is correct fun.push(function TryGet2 (i) { @@ -637,7 +653,10 @@ class ResultsPageModell { var j = 0 var currAnswer while (j < fun.length && SUtils.EmptyOrWhiteSpace(currAnswer)) { - currAnswer = fun[j](i) + try { + currAnswer = fun[j](i) + } catch (e) { + } j++ }