/
race_full.js
186 lines (178 loc) · 5.49 KB
/
race_full.js
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
PennController.ResetPrefix();
DebugOff();
// Control trial sequence
Sequence("consent","instructions", "race-trial", "send", "completion_screen");
// Consent form
newTrial("consent",
newText("consent-1", "<b>Description</b>")
.center()
.print()
,
newText("consent-2", "This study is part of the research of Daniel James, PhD, at the University of Düsseldorf. The goal of this study is to collect people's associations with particular words.")
.center()
.print()
,
newText("consent-3", "<b>Benefits and risks</b>")
.center()
.print()
,
newText("consent-4", "Your participation in this study will be to the benefit of the linguistic research of the principle investigator and to yourself in the form of financial compensation. There are no known risks to participating in this study.")
.center()
.print()
,
newText("consent-5", "<b>Privacy and confidentiality</b>")
.center()
.print()
,
newText("consent-6", "No indentifying information will be collected in this study. Your answers will be anonymous and will be stored in accordance with best practices in open science.")
.center()
.print()
,
newText("consent-7", "<b>Compensation</b>")
.center()
.print()
,
newText("consent-8", "As stated on Prolific, you will be compensated for your efforts on this study with AMOUNT. If you do not complete the study, or if you do not give legitimate answers to the questions, you will not be compensated")
.center()
.print()
,
newText("consent-9", "<b>Voluntary participation</b>")
.center()
.print()
,
newText("consent-11", "Your participation in this study is entirely voluntary and can be terminated at any time. Note that if you do not complete the study it will not be possible for you to compensate you for your work.")
.center()
.print()
,
newButton("agree", "I have read the above and consent.")
.center()
.print()
.log()
.wait()
);
// Instructions
newTrial("instructions",
defaultText
.cssContainer({"margin-bottom":"1em"})
.center()
.print()
,
newText("instructions-1", "Welcome!")
,
newText("instructions-2", "This study, is a simple word association task.")
,
newText("instructions-3", "You will be shown a word and be asked to write five features of the thing named by that word.</b>")
,
newText("instructions-4", "We are interested in your first impressions. There is no right or wrong answer, so choose quickly.")
,
newText("instructions-5", "Time is important.<br>Do not take too long.")
,
newText("instructions-6", "Please enter your ID and then click the button below to start the experiment.")
,
newTextInput("input_ID")
.cssContainer({"margin-bottom":"1em"})
.center()
.print()
,
newButton("starter", "Click to start the study")
.center()
.print()
.wait(getTextInput("input_ID").test.text(/.+/)
.failure(newText("Please write your Prolific ID.")
.center()
.color("red")
.print()
)
)
,
newVar("ID")
.global()
.set(getTextInput("input_ID"))
.log()
);
//race-trial
newTrial("race-trial",
newText("Prompt", "What are five things characteristic of <b>race</b>?")
.center()
.print()
,
newTextInput("input_race_1")
.cssContainer({"margin-bottom":"1em"})
.center()
.print()
,
newTextInput("input_race_2")
.cssContainer({"margin-bottom":"1em"})
.center()
.print()
,
newTextInput("input_race_3")
.cssContainer({"margin-bottom":"1em"})
.center()
.print()
,
newTextInput("input_race_4")
.cssContainer({"margin-bottom":"1em"})
.center()
.print()
,
newTextInput("input_race_5")
.cssContainer({"margin-bottom":"1em"})
.center()
.print()
,
newButton("starter", "Click to continue")
.center()
.print()
.wait(getTextInput("input_race_1").test.text(/.+/)
.and(getTextInput("input_race_2").test.text(/.+/))
.and(getTextInput("input_race_3").test.text(/.+/))
.and(getTextInput("input_race_4").test.text(/.+/))
.and(getTextInput("input_race_5").test.text(/.+/))
.failure(newText("Please write five things.")
.center()
.color("red")
.print()
)
)
,
newVar("race_1")
.global()
.set(getTextInput("input_race_1"))
.log()
,
newVar("race_2")
.global()
.set(getTextInput("input_race_2"))
.log()
,
newVar("race_3")
.global()
.set(getTextInput("input_race_3"))
.log()
,
newVar("race_4")
.global()
.set(getTextInput("input_race_4"))
.log()
,
newVar("race_5")
.global()
.set(getTextInput("input_race_5"))
.log()
)
// Send results manually
SendResults("send");
// Completion screen
newTrial("completion_screen",
newText("thanks", "Thank you for participating!")
.center()
.print()
,
newText("Prolific", "Please enter the following code into Prolific: C11Q50AE")
.center()
.print()
,
newButton("wait", "")
.wait()
);