无编辑摘要 |
无编辑摘要 标签:手工回退 |
||
(未显示同一用户的11个中间版本) | |||
第1行: | 第1行: | ||
// 引入jQuery计时器插件[6](@ref) | // 引入jQuery计时器插件[6](@ref) | ||
mw.loader.load('//cdn.jsdelivr.net/npm/jquery-countdown@2.2.0/dist/jquery.countdown.min.js'); | mw.loader.load('//cdn.jsdelivr.net/npm/jquery-countdown@2.2.0/dist/jquery.countdown.min.js'); | ||
// 维护开始时间戳(2025-04-05 03:00:00 UTC) | |||
// 维护开始时间(示例:2020-09-01 00:00:00 UTC) | // 维护开始时间(示例:2020-09-01 00:00:00 UTC) | ||
const startTimestamp = | const startTimestamp = 1743793200; | ||
function updateMaintenanceTimer() { | function updateMaintenanceTimer() { | ||
第12行: | 第14行: | ||
const hours = Math.floor((duration % 86400) / 3600); | const hours = Math.floor((duration % 86400) / 3600); | ||
const minutes = Math.floor((duration % 3600) / 60); | const minutes = Math.floor((duration % 3600) / 60); | ||
const seconds = duration % 60; | |||
// 更新页面显示 | // 更新页面显示 | ||
const timerElement = document.getElementById("maintenance-timer"); | const timerElement = document.getElementById("maintenance-timer"); | ||
if (timerElement) { | if (timerElement) { | ||
timerElement.textContent = ` | timerElement.textContent =`距离本赛季已维护${days}天${hours}时${minutes}分${seconds}秒`; | ||
} | } | ||
} | } |