diff --git a/CHANGELOG.md b/CHANGELOG.md index da0f686..7315edb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## 1.0.3 - 2021-09-26 +### Fixed +- Fixed an issue where the `html` tag was not being hidden once the script had loaded. + ## 1.0.2 - 2021-09-26 ### Fixed - Added new build files that should have been in `1.0.1`. diff --git a/dist/assets/sunset-to-sunset-legacy.min.js b/dist/assets/sunset-to-sunset-legacy.min.js index 60ad0eb..98deab3 100644 --- a/dist/assets/sunset-to-sunset-legacy.min.js +++ b/dist/assets/sunset-to-sunset-legacy.min.js @@ -1,2 +1,2 @@ -!function(){var t=document.createElement("style");t.innerHTML='.sts-banner{--tw-bg-opacity: 1;background-color:rgba(251,191,36,var(--tw-bg-opacity));position:relative;padding:.75rem;text-align:center;font-family:Inter var,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"}.sts-banner .sts-closing-time,.sts-banner .sts-opening-time{font-weight:600}html.sts-during-sabbath,html.sts-during-sabbath body{overflow:hidden}html.sts-during-sabbath body{max-height:100vh}.sts-full-message__container{top:0px;right:0px;bottom:0px;left:0px;position:absolute;--tw-bg-opacity: 1;background-color:rgba(255,255,255,var(--tw-bg-opacity));pointer-events:auto;overflow-y:scroll;z-index:500}.sts-full-message__heading{margin-bottom:1rem;font-size:3rem;font-weight:600}.sts-layout{display:flex;flex-wrap:wrap;margin-left:-.5rem;margin-right:-.5rem}.sts-layout .sts-layout__item{padding-left:.5rem;padding-right:.5rem}.sts-modal{width:90%;margin-left:auto;margin-right:auto;margin-top:7%;max-width:640px;justify-content:center}.sts-message-area{font-size:1rem;line-height:1.5rem;width:100%;text-align:center;padding-bottom:1rem}.sts-time-area{width:100%;text-align:center;border-top:1px solid lightgrey;padding-top:1rem}\n',document.head.appendChild(t),System.register([],(function(){"use strict";return{execute:function(){const t=(t,e)=>Object.assign(t,e),e=(t,e)=>{const n="cccc, LLLL d 'at' h:mm a ZZZZ";for(let s=0;s{console.log("Intializing Sunset to Sunset...");const n=luxon.DateTime,s=luxon.Duration,o=n.now();let i={};i["Current Time"]={Date:o.toLocaleString(n.DATE_FULL),Time:o.toLocaleString(n.TIME_WITH_SHORT_OFFSET)};const a=5==o.weekday||6==o.weekday,l=document.getElementsByTagName("html")[0];a&&l.classList.add("hidden");const r=document.querySelector("template#sts-settings");let c=null!=r?JSON.parse(r.dataset.settings):{};c=t(t({},{guardDuration:{minutes:30},messageDuration:{minutes:60},location:{lat:0,long:0},simulateTime:!1,debug:!1}),c),c.simulateTime&&console.warn("%cThe `simulateTime` option is enabled for the Sunset to Sunset plugin. Remember to disable this option once you are done verifying the settings.","font-size: 16px"),c.debug&&(console.group("Sunset to Sunset intialized with the following options:"),console.dir(c),console.groupEnd());const m=()=>c.location,d=async t=>{const e=t.split("T")[0],s=await fetch("https://api.sunrise-sunset.org/json?&lat="+m().lat+"&lng="+m().long+"&date="+e+"&formatted=0"),o=await s.json();return n.fromISO(o.results.sunset)},u=()=>{let t;t=c.simulateTime?0:5-o.weekday;const e=n.fromISO(o.plus({days:t})).toString();return d(e)},g=()=>{let t;t=c.simulateTime?1:6-o.weekday;const e=n.fromISO(o.plus({days:t})).toString();return d(e)},p=()=>c.guardDuration,h=t=>t.minus(s.fromObject(c.messageDuration)),b=(t,e)=>{let n;return"closing"==e&&(n=t.minus(p())),"opening"==e&&(n=t.plus(p())),n};a||c.simulateTime?(async()=>{const t=Promise.all([u(),g()]);return await t})().then((([t,s])=>{const a=b(t,"closing"),r=b(s,"opening");let m=!1,d=!1,u=!1,g=!1;if(c.simulateTime)switch(c.simulateTime){case"preparation-day":m=!0;break;case"banner-up":d=!0;break;case"during-sabbath":u=!0;break;case"after-sabbath":g=!0}else m=oh(a)&&o=a&&o<=r&&o.weekday>=5,g=o>r&&o>=6;if(m){const t=h(a).diff(o,"milliseconds").toObject();t.milliseconds>=0&&setTimeout((()=>{location.reload()}),t.milliseconds)}if(d){((t,n)=>{const s=document.querySelector("template#sts-banner-template");let o;if(s)o=s;else{let t=document.createElement("template");t.innerHTML='\n\t\t\t
\n\t\t\t\tBecause of religious beliefs our store will be closed over the Sabbath hours.\n\t\t\t\tClosing on and will re-open on .\n\t\t\t
\n\t\t',o=t}const i=o.content.cloneNode(!0),a=i.querySelectorAll(".sts-closing-time");e(a,t);const l=i.querySelectorAll(".sts-opening-time");e(l,n),document.body.insertBefore(i,document.body.firstChild)})(a,r);const t=a.diff(o,"milliseconds").toObject();t.milliseconds>=0&&setTimeout((()=>{location.reload()}),t.milliseconds)}if(u){(t=>{const n=document.querySelector("template#sts-full-message-template"),s=document.querySelector("template#sts-message-template"),o=n||s;let i;if(o)i=o.content.cloneNode(!0),i=i.firstElementChild;else{let t=document.createElement("div");t.innerHTML="\n\t\t\t

\n\t\t\t\tIn a world that seems to be spinning faster every day, we choose to stop \n\t\t\t\tand rest every Sabbath (Saturday). It’s a day for us to relax, refresh, \n\t\t\t\trefocus and worship; worship a God who loved us so much that He built a \n\t\t\t\tday of rest into Creation week and then commanded us to keep it \n\t\t\t\t(knowing we probably wouldn’t do it otherwise—even though it is for \n\t\t\t\tour best good).\n\t\t\t

\n\t\t",i=t}let a=document.createElement("template");a.innerHTML='\n\t\t
\n\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t

Sabbath

\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t

\n\t\t\t\t\t\tWe will re-open on .\n\t\t\t\t\t

\n\t\t\t\t
\n\t\t\t
\n\t\t\n\t\t
\n\t';const l=a.content.cloneNode(!0);if(n){let t=l.querySelector(".sts-full-message__container");for(;t.firstElementChild;)t.removeChild(t.firstChild);t.insertBefore(i,null)}else s&&l.querySelector(".sts-message-area").insertBefore(i,null);document.getElementsByTagName("html")[0].classList.add("sts-during-sabbath");const r=l.querySelectorAll(".sts-opening-time");e(r,t),document.body.insertBefore(l,document.body.firstChild)})(r);const t=r.diff(o,"milliseconds").toObject();t.milliseconds>=0&&setTimeout((()=>{location.reload()}),t.milliseconds)}if(l.classList.remove("hidden"),c.debug){let e={Enabled:{"Preparation day":m,"Banner up":d,"During the Sabbath":u,"After Sabbath":g}};console.group("Sunset to Sunset time checks"),console.table(e),console.groupEnd(),i["Banner up"]={Date:h(a).toLocaleString(n.DATE_FULL),Time:h(a).toLocaleString(n.TIME_WITH_SHORT_OFFSET)},i["Closing guard"]={Date:a.toLocaleString(n.DATE_FULL),Time:a.toLocaleString(n.TIME_WITH_SHORT_OFFSET)},i["Closing sunset"]={Date:t.toLocaleString(n.DATE_FULL),Time:t.toLocaleString(n.TIME_WITH_SHORT_OFFSET)},i["Opening sunset"]={Date:s.toLocaleString(n.DATE_FULL),Time:s.toLocaleString(n.TIME_WITH_SHORT_OFFSET)},i["Opening guard"]={Date:r.toLocaleString(n.DATE_FULL),Time:r.toLocaleString(n.TIME_WITH_SHORT_OFFSET)},console.group("Sunset to Sunset times"),console.table(i),console.groupEnd()}})):console.log("Sunset to Sunset: Exiting because today is not closing day")})()}}}))}(); +!function(){var t=document.createElement("style");t.innerHTML='.sts-banner{--tw-bg-opacity: 1;background-color:rgba(251,191,36,var(--tw-bg-opacity));position:relative;padding:.75rem;text-align:center;font-family:Inter var,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"}.sts-banner .sts-closing-time,.sts-banner .sts-opening-time{font-weight:600}html.sts-during-sabbath,html.sts-during-sabbath body{overflow:hidden}html.sts-during-sabbath body{max-height:100vh}.sts-full-message__container{top:0px;right:0px;bottom:0px;left:0px;position:absolute;--tw-bg-opacity: 1;background-color:rgba(255,255,255,var(--tw-bg-opacity));pointer-events:auto;overflow-y:scroll;z-index:500}.sts-full-message__heading{margin-bottom:1rem;font-size:3rem;font-weight:600}.sts-layout{display:flex;flex-wrap:wrap;margin-left:-.5rem;margin-right:-.5rem}.sts-layout .sts-layout__item{padding-left:.5rem;padding-right:.5rem}.sts-modal{width:90%;margin-left:auto;margin-right:auto;margin-top:7%;max-width:640px;justify-content:center}.sts-message-area{font-size:1rem;line-height:1.5rem;width:100%;text-align:center;padding-bottom:1rem}.sts-time-area{width:100%;text-align:center;border-top:1px solid lightgrey;padding-top:1rem}\n',document.head.appendChild(t),System.register([],(function(){"use strict";return{execute:function(){const t=(t,e)=>Object.assign(t,e),e=(t,e)=>{const n="cccc, LLLL d 'at' h:mm a ZZZZ";for(let s=0;s{console.log("Intializing Sunset to Sunset...");const n=luxon.DateTime,s=luxon.Duration,o=n.now();let i={};i["Current Time"]={Date:o.toLocaleString(n.DATE_FULL),Time:o.toLocaleString(n.TIME_WITH_SHORT_OFFSET)};const a=5==o.weekday||6==o.weekday,l=document.getElementsByTagName("html")[0],r=document.querySelector("template#sts-settings");let c=null!=r?JSON.parse(r.dataset.settings):{};c=t(t({},{guardDuration:{minutes:30},messageDuration:{minutes:60},location:{lat:0,long:0},simulateTime:!1,debug:!1}),c),(a||c.simulateTime)&&(l.style.display="none"),c.simulateTime&&console.warn("%cThe `simulateTime` option is enabled for the Sunset to Sunset plugin. Remember to disable this option once you are done verifying the settings.","font-size: 16px"),c.debug&&(console.group("Sunset to Sunset intialized with the following options:"),console.dir(c),console.groupEnd());const m=()=>c.location,d=async t=>{const e=t.split("T")[0],s=await fetch("https://api.sunrise-sunset.org/json?&lat="+m().lat+"&lng="+m().long+"&date="+e+"&formatted=0"),o=await s.json();return n.fromISO(o.results.sunset)},u=()=>{let t;t=c.simulateTime?0:5-o.weekday;const e=n.fromISO(o.plus({days:t})).toString();return d(e)},g=()=>{let t;t=c.simulateTime?1:6-o.weekday;const e=n.fromISO(o.plus({days:t})).toString();return d(e)},p=()=>c.guardDuration,b=t=>t.minus(s.fromObject(c.messageDuration)),f=(t,e)=>{let n;return"closing"==e&&(n=t.minus(p())),"opening"==e&&(n=t.plus(p())),n};a||c.simulateTime?(async()=>{const t=Promise.all([u(),g()]);return await t})().then((([t,s])=>{const a=f(t,"closing"),r=f(s,"opening");let m=!1,d=!1,u=!1,g=!1;if(c.simulateTime)switch(c.simulateTime){case"preparation-day":m=!0;break;case"banner-up":d=!0;break;case"during-sabbath":u=!0;break;case"after-sabbath":g=!0}else m=ob(a)&&o=a&&o<=r&&o.weekday>=5,g=o>r&&o>=6;if(m){const t=b(a).diff(o,"milliseconds").toObject();t.milliseconds>=0&&setTimeout((()=>{location.reload()}),t.milliseconds)}if(d){((t,n)=>{const s=document.querySelector("template#sts-banner-template");let o;if(s)o=s;else{let t=document.createElement("template");t.innerHTML='\n\t\t\t
\n\t\t\t\tBecause of religious beliefs our store will be closed over the Sabbath hours.\n\t\t\t\tClosing on and will re-open on .\n\t\t\t
\n\t\t',o=t}const i=o.content.cloneNode(!0),a=i.querySelectorAll(".sts-closing-time");e(a,t);const l=i.querySelectorAll(".sts-opening-time");e(l,n),document.body.insertBefore(i,document.body.firstChild)})(a,r);const t=a.diff(o,"milliseconds").toObject();t.milliseconds>=0&&setTimeout((()=>{location.reload()}),t.milliseconds)}if(u){(t=>{const n=document.querySelector("template#sts-full-message-template"),s=document.querySelector("template#sts-message-template"),o=n||s;let i;if(o)i=o.content.cloneNode(!0),i=i.firstElementChild;else{let t=document.createElement("div");t.innerHTML="\n\t\t\t

\n\t\t\t\tIn a world that seems to be spinning faster every day, we choose to stop \n\t\t\t\tand rest every Sabbath (Saturday). It’s a day for us to relax, refresh, \n\t\t\t\trefocus and worship; worship a God who loved us so much that He built a \n\t\t\t\tday of rest into Creation week and then commanded us to keep it \n\t\t\t\t(knowing we probably wouldn’t do it otherwise—even though it is for \n\t\t\t\tour best good).\n\t\t\t

\n\t\t",i=t}let a=document.createElement("template");a.innerHTML='\n\t\t
\n\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t

Sabbath

\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t

\n\t\t\t\t\t\tWe will re-open on .\n\t\t\t\t\t

\n\t\t\t\t
\n\t\t\t
\n\t\t\n\t\t
\n\t';const l=a.content.cloneNode(!0);if(n){let t=l.querySelector(".sts-full-message__container");for(;t.firstElementChild;)t.removeChild(t.firstChild);t.insertBefore(i,null)}else s&&l.querySelector(".sts-message-area").insertBefore(i,null);document.getElementsByTagName("html")[0].classList.add("sts-during-sabbath");const r=l.querySelectorAll(".sts-opening-time");e(r,t),document.body.insertBefore(l,document.body.firstChild)})(r);const t=r.diff(o,"milliseconds").toObject();t.milliseconds>=0&&setTimeout((()=>{location.reload()}),t.milliseconds)}if(l.style.display="block",c.debug){let e={Enabled:{"Preparation day":m,"Banner up":d,"During the Sabbath":u,"After Sabbath":g}};console.group("Sunset to Sunset time checks"),console.table(e),console.groupEnd(),i["Banner up"]={Date:b(a).toLocaleString(n.DATE_FULL),Time:b(a).toLocaleString(n.TIME_WITH_SHORT_OFFSET)},i["Closing guard"]={Date:a.toLocaleString(n.DATE_FULL),Time:a.toLocaleString(n.TIME_WITH_SHORT_OFFSET)},i["Closing sunset"]={Date:t.toLocaleString(n.DATE_FULL),Time:t.toLocaleString(n.TIME_WITH_SHORT_OFFSET)},i["Opening sunset"]={Date:s.toLocaleString(n.DATE_FULL),Time:s.toLocaleString(n.TIME_WITH_SHORT_OFFSET)},i["Opening guard"]={Date:r.toLocaleString(n.DATE_FULL),Time:r.toLocaleString(n.TIME_WITH_SHORT_OFFSET)},console.group("Sunset to Sunset times"),console.table(i),console.groupEnd()}})):console.log("Sunset to Sunset: Exiting because today is not closing day")})()}}}))}(); //# sourceMappingURL=sunset-to-sunset-legacy.min.js.map diff --git a/dist/assets/sunset-to-sunset.min.js b/dist/assets/sunset-to-sunset.min.js index fb4dbde..673f9f8 100644 --- a/dist/assets/sunset-to-sunset.min.js +++ b/dist/assets/sunset-to-sunset.min.js @@ -1,2 +1,2 @@ -export function __vite_legacy_guard(){import("data:text/javascript,")}const t=(t,e)=>Object.assign(t,e),e=(t,e)=>{const n="cccc, LLLL d 'at' h:mm a ZZZZ";for(let s=0;s{console.log("Intializing Sunset to Sunset...");const n=luxon.DateTime,s=luxon.Duration,o=n.now();let a={};a["Current Time"]={Date:o.toLocaleString(n.DATE_FULL),Time:o.toLocaleString(n.TIME_WITH_SHORT_OFFSET)};const i=5==o.weekday||6==o.weekday,l=document.getElementsByTagName("html")[0];i&&l.classList.add("hidden");const r=document.querySelector("template#sts-settings");let c=null!=r?JSON.parse(r.dataset.settings):{};c=t(t({},{guardDuration:{minutes:30},messageDuration:{minutes:60},location:{lat:0,long:0},simulateTime:!1,debug:!1}),c),c.simulateTime&&console.warn("%cThe `simulateTime` option is enabled for the Sunset to Sunset plugin. Remember to disable this option once you are done verifying the settings.","font-size: 16px"),c.debug&&(console.group("Sunset to Sunset intialized with the following options:"),console.dir(c),console.groupEnd());const u=()=>c.location,d=async t=>{const e=t.split("T")[0],s=await fetch("https://api.sunrise-sunset.org/json?&lat="+u().lat+"&lng="+u().long+"&date="+e+"&formatted=0"),o=await s.json();return n.fromISO(o.results.sunset)},m=()=>{let t;t=c.simulateTime?0:5-o.weekday;const e=n.fromISO(o.plus({days:t})).toString();return d(e)},g=()=>{let t;t=c.simulateTime?1:6-o.weekday;const e=n.fromISO(o.plus({days:t})).toString();return d(e)},p=()=>c.guardDuration,S=t=>t.minus(s.fromObject(c.messageDuration)),T=(t,e)=>{let n;return"closing"==e&&(n=t.minus(p())),"opening"==e&&(n=t.plus(p())),n};i||c.simulateTime?(async()=>{const t=Promise.all([m(),g()]);return await t})().then((([t,s])=>{const i=T(t,"closing"),r=T(s,"opening");let u=!1,d=!1,m=!1,g=!1;if(c.simulateTime)switch(c.simulateTime){case"preparation-day":u=!0;break;case"banner-up":d=!0;break;case"during-sabbath":m=!0;break;case"after-sabbath":g=!0}else u=oS(i)&&o=i&&o<=r&&o.weekday>=5,g=o>r&&o>=6;if(u){const t=S(i).diff(o,"milliseconds").toObject();t.milliseconds>=0&&setTimeout((()=>{location.reload()}),t.milliseconds)}if(d){((t,n)=>{const s=document.querySelector("template#sts-banner-template");let o;if(s)o=s;else{let t=document.createElement("template");t.innerHTML='\n\t\t\t
\n\t\t\t\tBecause of religious beliefs our store will be closed over the Sabbath hours.\n\t\t\t\tClosing on and will re-open on .\n\t\t\t
\n\t\t',o=t}const a=o.content.cloneNode(!0),i=a.querySelectorAll(".sts-closing-time");e(i,t);const l=a.querySelectorAll(".sts-opening-time");e(l,n),document.body.insertBefore(a,document.body.firstChild)})(i,r);const t=i.diff(o,"milliseconds").toObject();t.milliseconds>=0&&setTimeout((()=>{location.reload()}),t.milliseconds)}if(m){(t=>{const n=document.querySelector("template#sts-full-message-template"),s=document.querySelector("template#sts-message-template"),o=n||s;let a;if(o)a=o.content.cloneNode(!0),a=a.firstElementChild;else{let t=document.createElement("div");t.innerHTML="\n\t\t\t

\n\t\t\t\tIn a world that seems to be spinning faster every day, we choose to stop \n\t\t\t\tand rest every Sabbath (Saturday). It’s a day for us to relax, refresh, \n\t\t\t\trefocus and worship; worship a God who loved us so much that He built a \n\t\t\t\tday of rest into Creation week and then commanded us to keep it \n\t\t\t\t(knowing we probably wouldn’t do it otherwise—even though it is for \n\t\t\t\tour best good).\n\t\t\t

\n\t\t",a=t}let i=document.createElement("template");i.innerHTML='\n\t\t
\n\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t

Sabbath

\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t

\n\t\t\t\t\t\tWe will re-open on .\n\t\t\t\t\t

\n\t\t\t\t
\n\t\t\t
\n\t\t\n\t\t
\n\t';const l=i.content.cloneNode(!0);if(n){let t=l.querySelector(".sts-full-message__container");for(;t.firstElementChild;)t.removeChild(t.firstChild);t.insertBefore(a,null)}else s&&l.querySelector(".sts-message-area").insertBefore(a,null);document.getElementsByTagName("html")[0].classList.add("sts-during-sabbath");const r=l.querySelectorAll(".sts-opening-time");e(r,t),document.body.insertBefore(l,document.body.firstChild)})(r);const t=r.diff(o,"milliseconds").toObject();t.milliseconds>=0&&setTimeout((()=>{location.reload()}),t.milliseconds)}if(l.classList.remove("hidden"),c.debug){let e={Enabled:{"Preparation day":u,"Banner up":d,"During the Sabbath":m,"After Sabbath":g}};console.group("Sunset to Sunset time checks"),console.table(e),console.groupEnd(),a["Banner up"]={Date:S(i).toLocaleString(n.DATE_FULL),Time:S(i).toLocaleString(n.TIME_WITH_SHORT_OFFSET)},a["Closing guard"]={Date:i.toLocaleString(n.DATE_FULL),Time:i.toLocaleString(n.TIME_WITH_SHORT_OFFSET)},a["Closing sunset"]={Date:t.toLocaleString(n.DATE_FULL),Time:t.toLocaleString(n.TIME_WITH_SHORT_OFFSET)},a["Opening sunset"]={Date:s.toLocaleString(n.DATE_FULL),Time:s.toLocaleString(n.TIME_WITH_SHORT_OFFSET)},a["Opening guard"]={Date:r.toLocaleString(n.DATE_FULL),Time:r.toLocaleString(n.TIME_WITH_SHORT_OFFSET)},console.group("Sunset to Sunset times"),console.table(a),console.groupEnd()}})):console.log("Sunset to Sunset: Exiting because today is not closing day")})(); +export function __vite_legacy_guard(){import("data:text/javascript,")}const t=(t,e)=>Object.assign(t,e),e=(t,e)=>{const n="cccc, LLLL d 'at' h:mm a ZZZZ";for(let s=0;s{console.log("Intializing Sunset to Sunset...");const n=luxon.DateTime,s=luxon.Duration,o=n.now();let a={};a["Current Time"]={Date:o.toLocaleString(n.DATE_FULL),Time:o.toLocaleString(n.TIME_WITH_SHORT_OFFSET)};const i=5==o.weekday||6==o.weekday,l=document.getElementsByTagName("html")[0],r=document.querySelector("template#sts-settings");let c=null!=r?JSON.parse(r.dataset.settings):{};c=t(t({},{guardDuration:{minutes:30},messageDuration:{minutes:60},location:{lat:0,long:0},simulateTime:!1,debug:!1}),c),(i||c.simulateTime)&&(l.style.display="none"),c.simulateTime&&console.warn("%cThe `simulateTime` option is enabled for the Sunset to Sunset plugin. Remember to disable this option once you are done verifying the settings.","font-size: 16px"),c.debug&&(console.group("Sunset to Sunset intialized with the following options:"),console.dir(c),console.groupEnd());const u=()=>c.location,m=async t=>{const e=t.split("T")[0],s=await fetch("https://api.sunrise-sunset.org/json?&lat="+u().lat+"&lng="+u().long+"&date="+e+"&formatted=0"),o=await s.json();return n.fromISO(o.results.sunset)},d=()=>{let t;t=c.simulateTime?0:5-o.weekday;const e=n.fromISO(o.plus({days:t})).toString();return m(e)},g=()=>{let t;t=c.simulateTime?1:6-o.weekday;const e=n.fromISO(o.plus({days:t})).toString();return m(e)},p=()=>c.guardDuration,S=t=>t.minus(s.fromObject(c.messageDuration)),T=(t,e)=>{let n;return"closing"==e&&(n=t.minus(p())),"opening"==e&&(n=t.plus(p())),n};i||c.simulateTime?(async()=>{const t=Promise.all([d(),g()]);return await t})().then((([t,s])=>{const i=T(t,"closing"),r=T(s,"opening");let u=!1,m=!1,d=!1,g=!1;if(c.simulateTime)switch(c.simulateTime){case"preparation-day":u=!0;break;case"banner-up":m=!0;break;case"during-sabbath":d=!0;break;case"after-sabbath":g=!0}else u=oS(i)&&o=i&&o<=r&&o.weekday>=5,g=o>r&&o>=6;if(u){const t=S(i).diff(o,"milliseconds").toObject();t.milliseconds>=0&&setTimeout((()=>{location.reload()}),t.milliseconds)}if(m){((t,n)=>{const s=document.querySelector("template#sts-banner-template");let o;if(s)o=s;else{let t=document.createElement("template");t.innerHTML='\n\t\t\t
\n\t\t\t\tBecause of religious beliefs our store will be closed over the Sabbath hours.\n\t\t\t\tClosing on and will re-open on .\n\t\t\t
\n\t\t',o=t}const a=o.content.cloneNode(!0),i=a.querySelectorAll(".sts-closing-time");e(i,t);const l=a.querySelectorAll(".sts-opening-time");e(l,n),document.body.insertBefore(a,document.body.firstChild)})(i,r);const t=i.diff(o,"milliseconds").toObject();t.milliseconds>=0&&setTimeout((()=>{location.reload()}),t.milliseconds)}if(d){(t=>{const n=document.querySelector("template#sts-full-message-template"),s=document.querySelector("template#sts-message-template"),o=n||s;let a;if(o)a=o.content.cloneNode(!0),a=a.firstElementChild;else{let t=document.createElement("div");t.innerHTML="\n\t\t\t

\n\t\t\t\tIn a world that seems to be spinning faster every day, we choose to stop \n\t\t\t\tand rest every Sabbath (Saturday). It’s a day for us to relax, refresh, \n\t\t\t\trefocus and worship; worship a God who loved us so much that He built a \n\t\t\t\tday of rest into Creation week and then commanded us to keep it \n\t\t\t\t(knowing we probably wouldn’t do it otherwise—even though it is for \n\t\t\t\tour best good).\n\t\t\t

\n\t\t",a=t}let i=document.createElement("template");i.innerHTML='\n\t\t
\n\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t

Sabbath

\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t

\n\t\t\t\t\t\tWe will re-open on .\n\t\t\t\t\t

\n\t\t\t\t
\n\t\t\t
\n\t\t\n\t\t
\n\t';const l=i.content.cloneNode(!0);if(n){let t=l.querySelector(".sts-full-message__container");for(;t.firstElementChild;)t.removeChild(t.firstChild);t.insertBefore(a,null)}else s&&l.querySelector(".sts-message-area").insertBefore(a,null);document.getElementsByTagName("html")[0].classList.add("sts-during-sabbath");const r=l.querySelectorAll(".sts-opening-time");e(r,t),document.body.insertBefore(l,document.body.firstChild)})(r);const t=r.diff(o,"milliseconds").toObject();t.milliseconds>=0&&setTimeout((()=>{location.reload()}),t.milliseconds)}if(l.style.display="block",c.debug){let e={Enabled:{"Preparation day":u,"Banner up":m,"During the Sabbath":d,"After Sabbath":g}};console.group("Sunset to Sunset time checks"),console.table(e),console.groupEnd(),a["Banner up"]={Date:S(i).toLocaleString(n.DATE_FULL),Time:S(i).toLocaleString(n.TIME_WITH_SHORT_OFFSET)},a["Closing guard"]={Date:i.toLocaleString(n.DATE_FULL),Time:i.toLocaleString(n.TIME_WITH_SHORT_OFFSET)},a["Closing sunset"]={Date:t.toLocaleString(n.DATE_FULL),Time:t.toLocaleString(n.TIME_WITH_SHORT_OFFSET)},a["Opening sunset"]={Date:s.toLocaleString(n.DATE_FULL),Time:s.toLocaleString(n.TIME_WITH_SHORT_OFFSET)},a["Opening guard"]={Date:r.toLocaleString(n.DATE_FULL),Time:r.toLocaleString(n.TIME_WITH_SHORT_OFFSET)},console.group("Sunset to Sunset times"),console.table(a),console.groupEnd()}})):console.log("Sunset to Sunset: Exiting because today is not closing day")})(); //# sourceMappingURL=sunset-to-sunset.min.js.map diff --git a/dist/assets/test-legacy.min.js b/dist/assets/test-legacy.min.js index 3ede64f..9be7aaa 100644 --- a/dist/assets/test-legacy.min.js +++ b/dist/assets/test-legacy.min.js @@ -1,2 +1,2 @@ -!function(){var e=document.createElement("style");e.innerHTML='*,:before,:after{box-sizing:border-box}html{-moz-tab-size:4;-o-tab-size:4;tab-size:4}html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}body{font-family:system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"}hr{height:0;color:inherit}abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,select{text-transform:none}button{-webkit-appearance:button}legend{padding:0}progress{vertical-align:baseline}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}button{background-color:transparent;background-image:none}fieldset{margin:0;padding:0}ol,ul{list-style:none;margin:0;padding:0}html{font-family:Inter var,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";line-height:1.5}body{font-family:inherit;line-height:inherit}*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}hr{border-top-width:1px}img{border-style:solid}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#a1a1aa}input:-ms-input-placeholder,textarea:-ms-input-placeholder{opacity:1;color:#a1a1aa}input::placeholder,textarea::placeholder{opacity:1;color:#a1a1aa}button{cursor:pointer}table{border-collapse:collapse}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}button,input,optgroup,select,textarea{padding:0;line-height:inherit;color:inherit}pre,code,kbd,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-opacity: 1;border-color:rgba(228,228,231,var(--tw-border-opacity))}.relative{position:relative}.table{display:table}.hidden{display:none}@-webkit-keyframes spin{to{transform:rotate(360deg)}}@keyframes spin{to{transform:rotate(360deg)}}@-webkit-keyframes ping{75%,to{transform:scale(2);opacity:0}}@keyframes ping{75%,to{transform:scale(2);opacity:0}}@-webkit-keyframes pulse{50%{opacity:.5}}@keyframes pulse{50%{opacity:.5}}@-webkit-keyframes bounce{0%,to{transform:translateY(-25%);-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1)}}@keyframes bounce{0%,to{transform:translateY(-25%);-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1)}}*,:before,:after{--tw-shadow: 0 0 #0000}*,:before,:after{--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgba(59, 130, 246, .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000}\n',document.head.appendChild(e),System.register(["./sunset-to-sunset-legacy.min.js"],(function(){"use strict";return{setters:[function(){}],execute:function(){}}}))}(); +!function(){var e=document.createElement("style");e.innerHTML='*,:before,:after{box-sizing:border-box}html{-moz-tab-size:4;-o-tab-size:4;tab-size:4}html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}body{font-family:system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"}hr{height:0;color:inherit}abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,select{text-transform:none}button{-webkit-appearance:button}legend{padding:0}progress{vertical-align:baseline}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}button{background-color:transparent;background-image:none}fieldset{margin:0;padding:0}ol,ul{list-style:none;margin:0;padding:0}html{font-family:Inter var,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";line-height:1.5}body{font-family:inherit;line-height:inherit}*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}hr{border-top-width:1px}img{border-style:solid}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#a1a1aa}input:-ms-input-placeholder,textarea:-ms-input-placeholder{opacity:1;color:#a1a1aa}input::placeholder,textarea::placeholder{opacity:1;color:#a1a1aa}button{cursor:pointer}table{border-collapse:collapse}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}button,input,optgroup,select,textarea{padding:0;line-height:inherit;color:inherit}pre,code,kbd,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}*,:before,:after{--tw-border-opacity: 1;border-color:rgba(228,228,231,var(--tw-border-opacity))}.relative{position:relative}.block{display:block}.table{display:table}@-webkit-keyframes spin{to{transform:rotate(360deg)}}@keyframes spin{to{transform:rotate(360deg)}}@-webkit-keyframes ping{75%,to{transform:scale(2);opacity:0}}@keyframes ping{75%,to{transform:scale(2);opacity:0}}@-webkit-keyframes pulse{50%{opacity:.5}}@keyframes pulse{50%{opacity:.5}}@-webkit-keyframes bounce{0%,to{transform:translateY(-25%);-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1)}}@keyframes bounce{0%,to{transform:translateY(-25%);-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1)}}*,:before,:after{--tw-shadow: 0 0 #0000}*,:before,:after{--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgba(59, 130, 246, .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000}\n',document.head.appendChild(e),System.register(["./sunset-to-sunset-legacy.min.js"],(function(){"use strict";return{setters:[function(){}],execute:function(){}}}))}(); //# sourceMappingURL=test-legacy.min.js.map diff --git a/dist/assets/test.css b/dist/assets/test.css index 46f2ab9..8a107c9 100644 --- a/dist/assets/test.css +++ b/dist/assets/test.css @@ -1 +1 @@ -*,:before,:after{box-sizing:border-box}html{-moz-tab-size:4;-o-tab-size:4;tab-size:4}html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}body{font-family:system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"}hr{height:0;color:inherit}abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,select{text-transform:none}button{-webkit-appearance:button}legend{padding:0}progress{vertical-align:baseline}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}button{background-color:transparent;background-image:none}fieldset{margin:0;padding:0}ol,ul{list-style:none;margin:0;padding:0}html{font-family:Inter var,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";line-height:1.5}body{font-family:inherit;line-height:inherit}*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}hr{border-top-width:1px}img{border-style:solid}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#a1a1aa}input:-ms-input-placeholder,textarea:-ms-input-placeholder{opacity:1;color:#a1a1aa}input::placeholder,textarea::placeholder{opacity:1;color:#a1a1aa}button{cursor:pointer}table{border-collapse:collapse}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}button,input,optgroup,select,textarea{padding:0;line-height:inherit;color:inherit}pre,code,kbd,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-opacity: 1;border-color:rgba(228,228,231,var(--tw-border-opacity))}.relative{position:relative}.table{display:table}.hidden{display:none}@-webkit-keyframes spin{to{transform:rotate(360deg)}}@keyframes spin{to{transform:rotate(360deg)}}@-webkit-keyframes ping{75%,to{transform:scale(2);opacity:0}}@keyframes ping{75%,to{transform:scale(2);opacity:0}}@-webkit-keyframes pulse{50%{opacity:.5}}@keyframes pulse{50%{opacity:.5}}@-webkit-keyframes bounce{0%,to{transform:translateY(-25%);-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1)}}@keyframes bounce{0%,to{transform:translateY(-25%);-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1)}}*,:before,:after{--tw-shadow: 0 0 #0000}*,:before,:after{--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgba(59, 130, 246, .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000} +*,:before,:after{box-sizing:border-box}html{-moz-tab-size:4;-o-tab-size:4;tab-size:4}html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}body{font-family:system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"}hr{height:0;color:inherit}abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,select{text-transform:none}button{-webkit-appearance:button}legend{padding:0}progress{vertical-align:baseline}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}button{background-color:transparent;background-image:none}fieldset{margin:0;padding:0}ol,ul{list-style:none;margin:0;padding:0}html{font-family:Inter var,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";line-height:1.5}body{font-family:inherit;line-height:inherit}*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}hr{border-top-width:1px}img{border-style:solid}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#a1a1aa}input:-ms-input-placeholder,textarea:-ms-input-placeholder{opacity:1;color:#a1a1aa}input::placeholder,textarea::placeholder{opacity:1;color:#a1a1aa}button{cursor:pointer}table{border-collapse:collapse}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}button,input,optgroup,select,textarea{padding:0;line-height:inherit;color:inherit}pre,code,kbd,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}*,:before,:after{--tw-border-opacity: 1;border-color:rgba(228,228,231,var(--tw-border-opacity))}.relative{position:relative}.block{display:block}.table{display:table}@-webkit-keyframes spin{to{transform:rotate(360deg)}}@keyframes spin{to{transform:rotate(360deg)}}@-webkit-keyframes ping{75%,to{transform:scale(2);opacity:0}}@keyframes ping{75%,to{transform:scale(2);opacity:0}}@-webkit-keyframes pulse{50%{opacity:.5}}@keyframes pulse{50%{opacity:.5}}@-webkit-keyframes bounce{0%,to{transform:translateY(-25%);-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1)}}@keyframes bounce{0%,to{transform:translateY(-25%);-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1)}}*,:before,:after{--tw-shadow: 0 0 #0000}*,:before,:after{--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgba(59, 130, 246, .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000} diff --git a/package.json b/package.json index f5c0a3c..c331e65 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sunset-to-sunset", - "version": "1.0.2", + "version": "1.0.3", "description": "", "main": "src/js/main.js", "author": "Cavell Blood", diff --git a/src/js/main.js b/src/js/main.js index c96d0bc..0dc2d73 100644 --- a/src/js/main.js +++ b/src/js/main.js @@ -168,11 +168,6 @@ const SunsetToSunset = (() => { const html = document.getElementsByTagName('html')[0] - // Hide `html` until we have determined what things need to be rendered. - if (activateSunsetWatch) { - html.classList.add('hidden') - } - // Set default options const defaults = { guardDuration: { @@ -196,6 +191,11 @@ const SunsetToSunset = (() => { // Merge options with defaults options = extend(extend({}, defaults), options) + // Hide `html` until we have determined what things need to be rendered. + if (activateSunsetWatch || options.simulateTime) { + html.style.display = "none"; + } + if (options.simulateTime) { console.warn('%cThe `simulateTime` option is enabled for the Sunset to Sunset plugin. Remember to disable this option once you are done verifying the settings.', 'font-size: 16px') } @@ -397,7 +397,7 @@ const SunsetToSunset = (() => { } // Unhide `html` after we determine what things need to be rendered. - html.classList.remove('hidden') + html.style.display = "block" if (options.debug) {