upadas
This commit is contained in:
parent
a1966e3270
commit
27326c944b
2 changed files with 4 additions and 3 deletions
3
fetch.js
3
fetch.js
|
@ -36,8 +36,10 @@ function parseAnswers(response, resolve) {
|
||||||
for (let child of Array.from(allAnswersElement.children)) {
|
for (let child of Array.from(allAnswersElement.children)) {
|
||||||
index++;
|
index++;
|
||||||
const result = parseAnswerElement(index, child, allAnswersElement);
|
const result = parseAnswerElement(index, child, allAnswersElement);
|
||||||
|
if(result != undefined){
|
||||||
results.push(result);
|
results.push(result);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
resolve(results);
|
resolve(results);
|
||||||
}
|
}
|
||||||
|
@ -116,7 +118,6 @@ function getAnswersElement(index, allAnswersElement) {
|
||||||
if (answersElement.tagName === "P") {
|
if (answersElement.tagName === "P") {
|
||||||
answersElement = allAnswersElement.children[index + 2];
|
answersElement = allAnswersElement.children[index + 2];
|
||||||
}
|
}
|
||||||
console.log(answersElement);
|
|
||||||
return answersElement;
|
return answersElement;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
// @grant GM_setValue
|
// @grant GM_setValue
|
||||||
// @grant GM_getValue
|
// @grant GM_getValue
|
||||||
// @grant GM_xmlhttpRequest
|
// @grant GM_xmlhttpRequest
|
||||||
// @version 0.0.16
|
// @version 0.0.17
|
||||||
// @author Dominik Säume
|
// @author Dominik Säume
|
||||||
// ==/UserScript==
|
// ==/UserScript==
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue