better ratio to complete the question

This commit is contained in:
yoannchb-pro
2023-06-20 21:26:31 -04:00
parent 4d18aaf1b2
commit 69883870f6
4 changed files with 8 additions and 5 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+3 -1
View File
@@ -21,7 +21,9 @@ function handleRadioAndCheckbox(
for (const input of inputList as NodeListOf<HTMLInputElement>) {
const content = normalizeText(input.parentNode.textContent);
const valide = gptAnswer.normalizedResponse.includes(content);
const valide =
gptAnswer.normalizedResponse.includes(content) ||
content.includes(gptAnswer.normalizedResponse);
if (config.logs) Logs.responseTry(content, valide);
if (valide) {
if (config.mouseover) {
+3 -2
View File
@@ -45,7 +45,8 @@ function handleSelect(
for (const option of options) {
const content = normalizeText(option.textContent);
const valide = correct[j].includes(content);
const valide =
correct[j].includes(content) || content.includes(correct[j]);
/* Handle put in order question */
if (!/[^\d]+/gi.test(content)) {
@@ -55,7 +56,7 @@ function handleSelect(
const content = normalizeText(elementTitle.textContent);
const indexCorrectAnswer = correct.findIndex((answer) => {
const valide = answer.includes(content);
const valide = answer.includes(content) || content.includes(answer);
if (config.logs) Logs.responseTry(content, valide);
return valide;
});