diff --git a/scripts/content.js b/scripts/content.js index 115d617..77e3a38 100644 --- a/scripts/content.js +++ b/scripts/content.js @@ -476,11 +476,14 @@ async function runner() { msg = `Found better appointment in ${consulate} at ${chosenDate} ${chosenTime}`; console.log(msg); - await sendNotification(msg); - if (config.consulates[consulate].autobook) { + if (!config.consulates[consulate].autobook) { + await sendNotification(msg); + } else { await delay(PAGE_WAIT_TIME); - console.log('Auto booking'); + msg = `Auto booking in ${consulate} at ${chosenDate} ${chosenTime}`; + console.log(msg); + await sendNotification(msg); document.querySelector(".reveal-overlay:last-child [data-reveal] .button.alert").click(); } } // end consulates loop