diff --git a/scripts/content.js b/scripts/content.js index bdfb658..6e72c94 100644 --- a/scripts/content.js +++ b/scripts/content.js @@ -382,6 +382,17 @@ async function runner() { return; } + // Check if current time is between 11pm and 9am UTC (4pm - 2am PST) + let now = new Date(); + let currentHourUTC = now.getUTCHours(); + if (currentHourUTC >= 23 || currentHourUTC < 9) { + // Continue running the code + } else { + await chrome.storage.local.set({ "ctx_statusMsg": "not operational hours" }); + isRunning = false; + return; + } + if (isFoundAppointment) { // don't do anything if appointment is found and manual booking is required if (isAppointmentPage()) {