Revert "Remove operational hours"

This reverts commit 425ff34ea0.
This commit is contained in:
Maks Snegov 2024-05-02 13:15:17 -07:00
parent 2aaaa96dcf
commit 18c8b2112c

View File

@ -382,6 +382,17 @@ async function runner() {
return; 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) { if (isFoundAppointment) {
// don't do anything if appointment is found and manual booking is required // don't do anything if appointment is found and manual booking is required
if (isAppointmentPage()) { if (isAppointmentPage()) {