From f948c1ec76023f9ca694fa3f4831381b16d0d861 Mon Sep 17 00:00:00 2001 From: Ewsgit Date: Wed, 10 May 2023 13:25:40 +0100 Subject: [PATCH] Update bookwork.js --- sparxmaths.uk/bookwork.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sparxmaths.uk/bookwork.js b/sparxmaths.uk/bookwork.js index d3205b6..1fc653d 100644 --- a/sparxmaths.uk/bookwork.js +++ b/sparxmaths.uk/bookwork.js @@ -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 = () => { @@ -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 = () => {