summaryrefslogtreecommitdiff
path: root/create.html
blob: 3147f84ceae9edf90e3c3928b913e495eef68f32 (plain)
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
<style>
    .hide { display: none; }
</style>
<p>
Optional rules:
<div class="only1954">
<label>
<input type="checkbox" name="slow_french_reaction" value="true">
Slow French Reaction (1954 Scenario)
</label>
</div>

<div class="only1954">
<label>
<input type="checkbox" name="more_deterministic_independence" value="true">
More Deterministic Independence (1954 Scenario)
</label>
</div>

<div>
<label>
<input type="checkbox" name="shorter_game" value="true">
Shorter Game
</label>
</div>

<script>
let scenario = document.querySelector("select[name='scenario']");
scenario.onchange = function (evt) {
    document.querySelectorAll(".only1954").forEach(label => {
        label.classList.toggle("hide", scenario.value !== "1954")
        if (scenario.value !== "1954")
            label.querySelector("input").checked = false
    })
}
scenario.onchange();
</script>