fix friday refresh

master
Aevann 2023-09-22 23:23:08 +03:00
parent 6a4bc9de47
commit 3c98ab5c42
1 changed files with 3 additions and 3 deletions

View File

@ -372,10 +372,10 @@ if (location.pathname == '/orgy') {
const now = new Date();
const day_of_week = now.getUTCDay()
if (day_of_week == 5 || day_of_week == 7) {
if ([4,5,7].includes(day_of_week)) {
let hour
if (day_of_week == 5) hour = 0
else hour = 20
if (day_of_week == 7) hour = 20
else hour = 0
let millis = Date.UTC(now.getUTCFullYear(), now.getUTCMonth(), now.getUTCDate(), hour, 0, 10) - now;
if (millis < 0)