up
This commit is contained in:
parent
10b921c7c2
commit
a1966e3270
2 changed files with 2 additions and 7 deletions
7
fetch.js
7
fetch.js
|
@ -64,7 +64,6 @@ function getAllAnswersElement(response) {
|
|||
* @returns {Answer}
|
||||
*/
|
||||
function parseAnswerElement(index, element, allAnswersElement) {
|
||||
console.log("PARSING AWNSER", {});
|
||||
// Check for Possible Tags
|
||||
if (!(element.tagName === "P" || element.tagName === "STRONG")) {
|
||||
return;
|
||||
|
@ -89,11 +88,6 @@ function parseAnswerElement(index, element, allAnswersElement) {
|
|||
// Get Awsners
|
||||
const answersElement = getAnswersElement(index, allAnswersElement);
|
||||
if (answersElement === null || answersElement.tagName === "UL") return;
|
||||
|
||||
console.log({
|
||||
question: questionText,
|
||||
answers: getAnswers(answersElement),
|
||||
});
|
||||
|
||||
return {
|
||||
question: questionText,
|
||||
|
@ -122,6 +116,7 @@ function getAnswersElement(index, allAnswersElement) {
|
|||
if (answersElement.tagName === "P") {
|
||||
answersElement = allAnswersElement.children[index + 2];
|
||||
}
|
||||
console.log(answersElement);
|
||||
return answersElement;
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
// @grant GM_setValue
|
||||
// @grant GM_getValue
|
||||
// @grant GM_xmlhttpRequest
|
||||
// @version 0.0.15
|
||||
// @version 0.0.16
|
||||
// @author Dominik Säume
|
||||
// ==/UserScript==
|
||||
|
||||
|
|
Loading…
Reference in a new issue