-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathexperiment.html
executable file
·64 lines (53 loc) · 2.06 KB
/
experiment.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
<!DOCTYPE html>
<html>
<head>
<title>Card Game</title>
<!-- Load libraries -->
<script src="https://unpkg.com/[email protected]"></script>
<!-- Initialize jsPsych -->
<script src="./js/init-jspsych.js"></script>
<!-- Load jsPsych plug-ins -->
<script src="./js/plugin-mrst-trial.js"></script>
<script src="./js/plugin-mrst-instructions.js"></script>
<script src="./js/plugin-mrst-comprehension.js"></script>
<script src="./js/plugin-screen-check.js"></script>
<script src="https://unpkg.com/@jspsych/[email protected]"></script>
<script src="https://unpkg.com/@jspsych/[email protected]"></script>
<script src="https://unpkg.com/@jspsych/[email protected]"></script>
<script src="https://unpkg.com/@jspsych/[email protected]"></script>
<!-- Load expeirment -->
<script src="./js/mrst-experiment.js"></script>
<script src="./js/mrst-instructions.js"></script>
<!-- Load CSS styles -->
<link href="https://unpkg.com/[email protected]/css/jspsych.css" rel="stylesheet" type="text/css" />
<link href="./css/mrst-css.min.css" rel="stylesheet" type="text/css"></link>
</head>
<body></body>
<script>
// Define image preloading.
var PRELOAD = {
type: jsPsychPreload,
images: [stimuli],
message: 'Loading images. This may take a moment depending on your internet connection.',
error_message: '<p>The experiment failed to load. Please try restarting your browser.</p><p>If this error persists after 3-4 restarts, please contact the experimenter.</p>',
continue_after_error: false,
show_progress_bar: true,
max_load_time: 30000
}
// Define experiment fullscreen.
var FULLSCREEN = {
type: jsPsychFullscreen,
fullscreen_mode: true
}
// Initialize timeline.
var timeline = [];
timeline = timeline.concat(PRELOAD);
timeline = timeline.concat(FULLSCREEN);
timeline = timeline.concat(INSTRUCTIONS_SKIP);
timeline = timeline.concat(INSTRUCTIONS);
timeline = timeline.concat(READY);
timeline = timeline.concat(MRST);
// Execute timeline.
jsPsych.run(timeline);
</script>
</html>