From 923dd7495b2b2e8cca6065c69b464f612ef636bf Mon Sep 17 00:00:00 2001 From: Maks Snegov Date: Wed, 24 Apr 2024 17:01:31 -0700 Subject: [PATCH] Send notification on autobook --- scripts/content.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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