-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
53 lines (45 loc) · 1.29 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
<!DOCTYPE html>
<html>
<head>
<!-- include jsPsych first -->
<script src="https://web-experiments.lab.hum.uu.nl/jspsych/6.1.0/jspsych.js"></script>
<script src="https://web-experiments.lab.hum.uu.nl/jspsych/6.1.0/plugins/jspsych-html-button-response.js"></script>
<script src="./jspsych-uil-utils-import.js" type="module"></script>
</head>
<body>
<p>For now you can play with the browser console to examine the jspsych uil utils</p>
<script>
const ACCESS_KEY = "d673bcac-584b-426b-93dc-8dc901a95db6";
const ACC_ACCESS_KEY = "01d3f980-15de-476a-b5a5-2d60b0fb8aaa";
function testUtils() {
let server = "acc";
if (server === "acc") {
uil.useAcceptationServer();
uil.setAccessKey(ACC_ACCESS_KEY);
}
else {
uil.setAccessKey(ACCESS_KEY);
}
uil.stopIfExperimentClosed();
let start_screen = {
type: 'html-button-response',
stimulus: "Press the ok button to continue",
choices: ["OK"],
response_ends_trial: true
};
jsPsych.init(
{
timeline:[start_screen],
on_finish : function() {
uil.saveData();
}
}
)
}
window.addEventListener (
'load',
testUtils
);
</script>
</body>
</html>