diff --git a/CFWorkers.js b/CFWorkers.js index 767e3e5..663bf17 100644 --- a/CFWorkers.js +++ b/CFWorkers.js @@ -19,19 +19,20 @@ addEventListener('fetch', event => { url.protocol = 'https:' response = Response.redirect(url.href); event.respondWith( response ); - } - let nd = new Date(); - if (nd.getDate()%2) { - host = SingleDay } else { - host = DoubleDay - } - if (!CFproxy) { - url.hostname=host; - let request=new Request(url,event.request); - event.respondWith( fetch(request) ) - } else { - event.respondWith( fetchAndApply(event.request) ); + let nd = new Date(); + if (nd.getDate()%2) { + host = SingleDay + } else { + host = DoubleDay + } + if (!CFproxy) { + url.hostname=host; + let request=new Request(url,event.request); + event.respondWith( fetch(request) ) + } else { + event.respondWith( fetchAndApply(event.request) ); + } } })