kontakt: [email protected]
Widżet:Orgonity: Różnice pomiędzy wersjami
Przejdź do nawigacji
Przejdź do wyszukiwania
imported>Sługa szatana mNie podano opisu zmian |
imported>Sługa szatana mNie podano opisu zmian |
||
Linia 1: | Linia 1: | ||
<includeonly><div id="orgonity"></div><script type="text/javascript"> | <includeonly><div id="orgonity"></div><script type="text/javascript"> | ||
let interval; | |||
let format = arr => { | let format = arr => { | ||
let wynik = []; | let wynik = []; | ||
Linia 29: | Linia 30: | ||
} | } | ||
let update = () => { | let update = () => { | ||
if (orgonity()) { | |||
jupi(document.getElementById("orgonity")); | |||
clearInterval(interval); | |||
return; | |||
} | |||
let a = new Date(); | let a = new Date(); | ||
a.setHours(0); | a.setHours(0); | ||
Linia 40: | Linia 46: | ||
let formatted = format(r); | let formatted = format(r); | ||
let orgonit = document.getElementById("orgonity"); | let orgonit = document.getElementById("orgonity"); | ||
orgonit.innerText = formatted; | |||
}; | }; | ||
update(); | let orgonity = () => { | ||
let now = new Date(); | |||
return now.getDay() == 6 && now.getHours() < 4; | |||
} | |||
let jupi = el => { | |||
el.style.color = "green"; | |||
el.style.fontSize = "1.25em"; | |||
el.innerText = "ORGONITY JUPI"; | |||
} | |||
if (orgonity()) { | |||
jupi(document.getElementById("orgonity")); | |||
} else { | |||
update(); | |||
interval = setInterval(update, 1000); | |||
} | |||
</script></includeonly> | </script></includeonly> |