Widżet:Orgonity: Różnice pomiędzy wersjami

Z ChanWiki
Przejdź do nawigacji Przejdź do wyszukiwania
imported>Sługa szatana
mNie podano opisu zmian
imported>Sługa szatana
m zesrałem się i śmierdzi mocno
Linia 1: Linia 1:
<includeonly><script type="text/javascript">
<includeonly><div id="orgonity"></div><script type="text/javascript">
     let format = arr => {
     let format = arr => {
         console.debug(arr);
         console.debug(arr);
Linia 29: Linia 29:
         return [days, hours, minutes, seconds];
         return [days, hours, minutes, seconds];
     }
     }
     let a = new Date();
     let update = () => {
    a.setHours(0);
        let a = new Date();
    a.setMinutes(0);
        a.setHours(0);
    a.setSeconds(0);
        a.setMinutes(0);
    a.setMilliseconds(0);
        a.setSeconds(0);
    a.setDate(a.getDate() + (13 - a.getDay()) % 7);
        a.setMilliseconds(0);
    let b = new Date();
        a.setDate(a.getDate() + (13 - a.getDay()) % 7);
    let r = interval(Math.abs(b - a));
        let b = new Date();
    console.debug(format(r));
        let r = interval(Math.abs(b - a));
        let formatted = format(r);
        let orgonit = document.getElementById("orgonity");
        orgonity.innerText = formatted;
    };
    update();
    setInterval(update, 5000);
</script></includeonly>
</script></includeonly>

Wersja z 05:43, 18 gru 2020