打开/关闭搜索
搜索
打开/关闭菜单
14
6636
42
1.1万
OGAS数据中枢
导航
首页
最近更改
随机页面
特殊页面
上传文件
少女前线
简介
战术人形
装备图鉴
BGM
任务
打开/关闭外观设置菜单
通知
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。
user-interface-preferences
个人工具
注册
登录
查看“︁Widget:Countdown”︁的源代码
来自OGAS数据中枢
更多操作
←
Widget:Countdown
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
管理员
您没有权限编辑
Widget
命名空间内的页面。
您可以查看和复制此页面的源代码。
<noinclude> 这是一个活动倒计时组件,仅供{{tl|Countdown}}使用。 {{#widget:Countdown|target=today-end}} </noinclude> <includeonly> <span class="countdown-timer" data-target="<!--{$target|default:'today-end'|escape:'quotes'}-->">...</span> <script> (function() { let t = null; function u() { const n = new Date(); document.querySelectorAll('.countdown-timer').forEach(el => { const s = el.getAttribute('data-target'); let g = s === 'today-end' ? new Date(n.getFullYear(), n.getMonth(), n.getDate(), 23, 59, 59) : new Date(s); const d = g - n; if (d <= 0) { el.innerHTML = "Ended"; return; } const h = Math.floor(d / 36e5); const m = Math.floor((d % 36e5) / 6e4); const c = Math.floor((d % 6e4) / 1e3); el.innerHTML = [h, m, c].map(v => v < 10 ? "0" + v : v).join(":"); }); } function start() { if (!t) { u(); t = setInterval(u, 1000); } } function stop() { clearInterval(t); t = null; } document.addEventListener('visibilitychange', () => { if (document.hidden) { stop(); } else { start(); } }); start(); })(); </script> </includeonly>
该页面嵌入的页面:
Template:Tl
(
查看源代码
)
Template:Transclude
(
查看源代码
)
返回
Widget:Countdown
。
查看“︁Widget:Countdown”︁的源代码
来自OGAS数据中枢