From Dark and Darker Wiki

(changing scope of inner variables)
(Testing function name)
Line 2: Line 2:
<span id="<!--{$uniqueId|default:'timer'|escape:'html'}-->"></span>
<span id="<!--{$uniqueId|default:'timer'|escape:'html'}-->"></span>
<script>
<script>
function setIntOnStart(func, interval) {
function setIntOnStart<!--{$uniqueId|default:'timer'|escape:'html'}-->(func, interval) {
     func();
     func();
     return setInterval(func, interval);
     return setInterval(func, interval);
}
}
var x = setIntOnStart( _ => {
var x = setIntOnStart<!--{$uniqueId|default:'timer'|escape:'html'}-->( _ => {
     let id = "<!--{$uniqueId|default:'timer'|escape:'html'}-->";
     let id = "<!--{$uniqueId|default:'timer'|escape:'html'}-->";
     let countDownDate = new Date('<!--{$date|escape:'quotes'}-->').getTime();
     let countDownDate = new Date('<!--{$date|escape:'quotes'}-->').getTime();

Revision as of 01:28, 26 August 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 1

{{#widget:Countdown|uniqueId=A|date=2024-08-26 23:59:59}}

Example 2

{{#widget:Countdown|uniqueId=B|date=2024-08-25 23:59:59}}

Example 3

{{#widget:Countdown|uniqueId=C|date=2024-08-24 23:59:59}}