LLWiki正在建设中,欢迎加入我们

“Widget:Countdown”的版本间差异

跳转到导航 跳转到搜索
before = ele.children[0],
after = ele.children[1],
i18n = ele.dataset.title,
isBefore = then.isBefore(now),
monthsHave31Days = [0, 2, 4, 6, 7, 9, 11], // 月份从0开始
second = isBefore ? now.second() - then.second() : then.second() - now.second(),
result = "";
ele.removeAttribute('title');
if (second < 0) {
minute--;
const run = () => {
document.querySelectorAll( '.countdownNode:not(.disabled)' ).forEach((ele) => {
ele.dataset.title = ele.title;
ele.removeAttribute('title');
fromNow(ele);
ele.style.visibility = "visible";
window.setInterval(runfromNow(ele), 1000);
});
};
});
run();
window.setInterval(run, 1000);
});
//</pre>