Skip to content

Commit

Permalink
Update bookwork.js
Browse files Browse the repository at this point in the history
  • Loading branch information
ewsgit authored May 10, 2023
1 parent 56d399c commit f948c1e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sparxmaths.uk/bookwork.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ function main() {

let middle = document.querySelectorAll("#top-bar > div")[0]

if (!middle) return
if (!middle) return console.error("ESOEXT: unable to find bookwork container")

if (document.querySelectorAll(`#skill-delivery-answer-button`)[0]) {
document.querySelectorAll(`#skill-delivery-answer-button`)[0].onclick = () => {
Expand All @@ -139,11 +139,15 @@ function main() {
parsed: parseAnswer(document.querySelectorAll(`.answer`)[0].innerHTML)
}
chrome.storage.local.set({sparxPreviousAnswers: previousAnswers}, null)
} else {
console.error("ESOEXT: unable to find answer supplied")
}
console.table(previousAnswers)
}
}, 1000)
}
} else {
console.error("ESOEXT: unable to find skill-answer-delivery-button")
}

document.querySelectorAll(`#status-bar > div.back-button`)[0].onclick = () => {
Expand Down

0 comments on commit f948c1e

Please sign in to comment.