-
Notifications
You must be signed in to change notification settings - Fork 6
/
index.html
105 lines (82 loc) · 2.93 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<!DOCTYPE html>
<html>
<head>
<title>SCP Wiki Timers</title>
<meta charset="UTF-8">
</head>
<body>
<h1>Timers</h1>
<p>
This is the <a href="https://pages.github.com/">GitHub Pages</a> site for <a href="https://github.com/scpwiki/timer">SCP Wiki Timers</a>. These utilities are intended to be iframe'd into other contexts so that timers for Wikidot pages and forum threads can be easily created.
</p>
<p>
Page index:
</p>
<h2 id="timer"><a href="/timer/timer.html">Timer</a></h2>
<p>
An iframe containing a particular instance of a timer counting towards a specified timestamp.
Timers are "persistent" in that they record the target timestamp in its URL, so an
<tt>[[iframe]]</tt> in a forum post will continually target the same time even if
the page is reloaded.
</p>
<p>
<strong>Query Parameters:</strong>
</p>
<ul>
<li>
<tt>lang</tt> — <strong>Required.</strong> The language to be used.
For instance, use <tt>en</tt> for English.
</li>
<li>
<tt>time</tt> — <strong>Required.</strong> The target timestamp for the timer.
Can either be a UNIX timestamp in seconds, or an ISO date string (whatever Javascript's
<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse"><tt>Date.parse()</tt></a> can handle).
</li>
<li>
<tt>progress</tt> — Custom message for while the timer is ticking down.
</li>
<li>
<tt>finished</tt> — Custom message for after the timer has expired.
</li>
<li>
<tt>style</tt> — Custom CSS to inject into the document to style the timer.
</li>
</ul>
<h2 id="timer-selector"><a href="/timer/timer-selector.html">Timer Selector</a></h2>
<p>
A utilty to help automatically build a timer instance, to insert into a Wikidot context
via <tt>[[iframe]]</tt> wikitext.
</p>
<p>
<strong>Query Parameters:</strong>
</p>
<ul>
<li>
<tt>lang</tt> — <strong>Required.</strong> The language to be used.
</li>
<li>
<tt>style</tt> — Custom CSS to inject into the document to style the timer.
</li>
</ul>
<p>
<strong>Template Variables:</strong>
</p>
<p>
In the "advanced" section, the output can be customized by setting a template.
For instance, each outputted timer can have copy afterwards explaining procedure,
or a link to some policy page.
</p>
<p>
Variables are substituted as part of the wikitext generation process.
The supported values are as follows:
</p>
<ul>
<li>
<tt>%%url%%</tt> — The timer URL, with all query parameters.
</li>
<li>
<tt>%%iframe%%</tt> — The Wikidot <tt>[[iframe]]</tt> block, with any styling.
</li>
</ul>
</body>
</html>