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

“Widget:Countdown”的版本间差异

跳转到导航 跳转到搜索
添加4字节 、​ 2020年10月30日 (五) 05:54
无编辑摘要
hour = isBefore ? now.getHours() - then.getHours() : then.getHours() - now.getHours(),
minute = isBefore ? now.getMinutes() - then.getMinutes() : then.getMinutes() - now.getMinutes(),
second = isBefore ? now.getSeconds() - then.getSeconds() : then.getSeconds() - now.getSeconds(),
result = "";
if (second < 0) {
else if (result !== "") { result += `<span class="countdown-num">0</${"span"}><span class="countdown-hour"></${"span"}>`; }
if(day == 0) {
if (minute > 0) { result += `<span class="countdown-num">${minute}</${"span"}>分'`; }
else if (result !== "") { result += `<span class="countdown-num">0</${"span"}>分'`; }
if (second > 0) { result += `<span class="countdown-num">${second}</${"span"}>秒'`; }
else if (result !== "") { result += `<span class="countdown-num">0</${"span"}>秒'`; }
}
}
16,874

个编辑

导航菜单