diff --git a/stable.user.js b/stable.user.js index 137d052..f061245 100755 --- a/stable.user.js +++ b/stable.user.js @@ -353,10 +353,9 @@ ) }, getterFunction: node => { - const gradeText = node.getElementsByClassName('grade')[0].innerText const possibleAnswers = getPossibleAnswers(node) - if (gradeText.includes('0,00')) { + if (getIfSolutionIsCorrect(node)) { if (possibleAnswers.length === 2) { return [ { @@ -381,6 +380,12 @@ }, } + function getIfSolutionIsCorrect(node) { + const gradeText = node.getElementsByClassName('grade')[0].innerText + const stateText = node.getElementsByClassName('state')[0].innerText + return stateText.includes('Helyes') || !gradeText.includes('0,00') + } + function getPossibleAnswers(node) { const answerNodes = Array.from( node.getElementsByClassName('answer')[0].childNodes