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

“Widget:Countdown”的版本间差异

跳转到导航 跳转到搜索
添加239字节 、​ 2020年10月1日 (四) 01:54
无编辑摘要
}
if (year > 0) { result += `<span class="countdown-num">${year}</` + 'span>年'; }
if (month > 0) { result += `<span class="countdown-num">${month}</` + 'span><span class="countdown-month"><' + i18n.substring(2)'/span>'; }
else if (result !== "") { result += `<span class="countdown-num">${0}</` + 'span><span class="countdown-month"><' + i18n.substring(2)'/span>'; }
if (day > 0) { result += `<span class="countdown-num">${day}</` + 'span>天'; }
else if (result !== "") { result += `<span class="countdown-num">${0}</` + 'span>天'; }
if(year == 0 && month == 0) {
if (hour > 0) { result += `<span class="countdown-num">${hour}</` + 'span><span class="countdown-hour"><' + i18n.substring(0, 2)'/span>'; }
else if (result !== "") { result += `<span class="countdown-num">${0}</` + 'span><span class="countdown-hour"><' + i18n.substring(0, 2)'/span>'; }
if(day == 0) {
if (minute > 0) { result += `<span class="countdown-num">${minute}</` + 'span>分'; }
if(isBefore) {
var countdown = before.querySelector( '.countdown' );
if(countdown) { countdown.textContentinnerHTML = result; }
before.style.display = "";
after.style.display = "none";
else {
var countdown = after.querySelector( '.countdown' );
if(countdown) { countdown.textContentinnerHTML = result; }
after.style.display = "";
before.style.display = "none";
}
ele.querySelector( '.countdown-month' ).textContent = i18n.substring(2);
ele.querySelector( '.countdown-hour' ).textContent = i18n.substring(0,2);
};
const run = () => {
16,874

个编辑

导航菜单