From ba9f812041743c3d3913859a5e666fef3fa16143 Mon Sep 17 00:00:00 2001 From: MrFry Date: Mon, 13 Jan 2020 14:56:10 +0100 Subject: [PATCH] Question class tostring, removed some todos --- stable.user.js | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/stable.user.js b/stable.user.js index 9bdaf36..266cc93 100644 --- a/stable.user.js +++ b/stable.user.js @@ -260,11 +260,11 @@ } toString () { - var r = '?' + this.Q + '\n!' + this.A - if (this.data.type === 'image') { - r += '\n>' + this.data.images.join(', ') + if (this.data.type !== 'simple') { + return '?' + this.Q + '\n!' + this.A + '\n>' + JSON.stringify(this.data) + } else { + return '?' + this.Q + '\n!' + this.A } - return r } HasQuestion () { @@ -798,7 +798,6 @@ // "hĂșzza oda ..." skip fun.push((i) => { let temp = RPM.GetAnswersFromGrabBox(i) - console.log('GRABBOX TEST', temp) // TODO: remove return temp.map((x) => { return x.text }).join(', ') @@ -1264,7 +1263,6 @@ var answers = [] questions.forEach((x, j) => { let question = SUtils.EmptyOrWhiteSpace(x) ? '' : SUtils.RemoveUnnecesarySpaces(x) // simplifying question - // TODO: getdatafromquestion, implement grabboxes answering var result = data.Search(question, GetImageDataFromImgNodes(imgNodes)) var r = PrepareAnswers(result, j) if (r !== undefined) { answers.push(r) } @@ -1387,11 +1385,6 @@ } } - // TODO - // function GetGrabBoxPositionsFromQuestion (i) { - // return asd - // } - function GetDataFormResult (i) { let data = { type: 'simple' }