From Dark and Darker Wiki
No edit summary |
(Change countdown ending text) |
||
(2 intermediate revisions by one other user not shown) | |||
Line 20: | Line 20: | ||
if (distance < 0) { | if (distance < 0) { | ||
clearInterval(<!--{$uniqueId|default:'timer'|escape:'html'}-->); | clearInterval(<!--{$uniqueId|default:'timer'|escape:'html'}-->); | ||
document.getElementById(id).innerHTML = " | document.getElementById(id).innerHTML = "ENDED"; | ||
} | } | ||
}, 1000); | }, 1000); | ||
Line 35: | Line 35: | ||
==Example 1== | ==Example 1== | ||
<pre>{{#widget:Countdown|uniqueId=A|date= | <pre>{{#widget:Countdown|uniqueId=A|date=2025-08-26 23:59:59}}</pre> | ||
{{#widget:Countdown|uniqueId=A|date= | {{#widget:Countdown|uniqueId=A|date=2025-08-26 23:59:59}} | ||
==Example 2== | ==Example 2== | ||
<pre>{{#widget:Countdown|uniqueId=B|date=2024- | <pre>{{#widget:Countdown|uniqueId=B|date=2024-12-31 23:59:59}}</pre> | ||
{{#widget:Countdown|uniqueId=B|date=2024- | {{#widget:Countdown|uniqueId=B|date=2024-12-31 23:59:59}} | ||
==Example 3== | ==Example 3== |
Latest revision as of 10:28, 1 September 2024
Parameters
uniqueId
- Determines element id name
- Name needs to be unique if multiple widgets are to be displayed on the same page.
- Default:
timer
date
- String of text indicating a date and time.
- Example:
2024-12-31 23:59:59
- Example:
Example 1
{{#widget:Countdown|uniqueId=A|date=2025-08-26 23:59:59}}
Example 2
{{#widget:Countdown|uniqueId=B|date=2024-12-31 23:59:59}}
Example 3
{{#widget:Countdown|uniqueId=C|date=2024-08-24 23:59:59}}