Question getting match percent fix, licence fix

This commit is contained in:
YourFriendlyNeighborhoodDealer 2019-03-06 09:43:05 +01:00
parent 4ed1fab920
commit fad66afef8
3 changed files with 17 additions and 4 deletions

10
main.js
View file

@ -39,6 +39,7 @@ var motd = "";
var lastestVersion = "";
const minMatchAmmount = 55;
const minResultMatchPercent = 99;
const lengthDiffMultiplier = 10;
//: Class descriptions {{{
@ -1232,7 +1233,14 @@ function ShowSaveQuizDialog(addedQ, allQ, allOutput, output, sendSuccess, sentDa
function SearchSameQuestion(questionData, quiz, i) {
var r = questionData.Search(quiz[i].Q);
return r.length == 0 ? -1 : r.length;
let count = 0;
r.forEach((item) => {
if (item.match > minResultMatchPercent)
count ++;
});
return count == 0 ? -1 : count;
}
// this should get the image url from a result page