-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
82 lines (75 loc) · 2.67 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
<html>
<head>
<meta charset="UTF-8">
<title> Picky </title>
</head>
<body>
<script src="picky.js?v=14"></script>
<h1> Picky </h1>
<p>
This pool will randomly assign prizes to a group of contestants.
</p>
<p>
To duplicate a line in either box, enter it like this:
<tt style="background-color: #ddeedd">10x General Electric Toaster</tt>
Blank lines and leading and trailing spaces are ignored.
</p>
<p>
If there are more contestants than prizes, some contestants won't
get a prize.
</p>
<p>
If there are more prizes than contestants,
<select id="tooManyPrizes">
<option value="reportAnError">an error will be reported</option>
<option value="awardAgain">give everyone a second chance
at leftover prizes</option>
<option value="noWin">list "no winner" for the extra prizes</option>
</select>.
</p>
<h2> Contestants </h2>
<textarea cols="70" rows="10" id="contestants"
style="background-color: #fafafa"
placeholder="
Enter contestants in this box, one per line.
See above for multiplier if one contestant needs
multiple entries."></textarea>
<br>
<h2> Prizes </h2>
<textarea cols="70" rows="10" id="prizes"
style="background-color: #fafafa"
placeholder="
Enter prizes in this box, one per line.
See above for multiplier if you have a multiple
of a single prize."></textarea>
<br>
<h2> Winners </h2>
<button id="selectWinners" onclick="selectWinners();">Select winners!</button>
<button id="clearWinners" disabled="true" onclick="maybeClearWinners();">Clear winners list.</button>
<select id="sortBy" onchange="populateWinnersBox();">
<option value="no">Output winners in order of prize above.</option>
<option value="name">Sort alphabetically by name of winner.</option>
<option value="prize">Sort alphabetically by prize.</option>
</select>
<br>
<textarea cols="70" rows="20" id="out" readonly="true" placeholder="
↑↑↑
Click the button above to select winners
once you have entered names and prizes in
the fields above.
"></textarea>
<br>
<hr>
<h2> Testing </h2>
<button onclick="insertData('names.txt', 'contestants');">Use fake names.</button>
<br>
<button onclick="insertData('prizes.txt', 'prizes');">Use fake prizes.</button>
<br>
<p>
No modern web site is complete without
<a href="disclaimers.html">disclaimers</a>
or <a href="copyright.html">copyright</a>.
<a href="https://github.com/ts4z/picky">Source code is on GitHub.</a>
</p>
</body>
</html>