diff --git a/replay/index.html b/replay/index.html
index a2ee111..cdcfa40 100644
--- a/replay/index.html
+++ b/replay/index.html
@@ -20,6 +20,14 @@
const timeline = create_srt_timeline(jsPsych);
+ const end = {
+ type: jsPsychHtmlButtonResponse,
+ stimulus: '',
+ choices: ['Watch replay']
+ }
+
+ timeline.push(end);
+
jsPsych.run(timeline);
}
@@ -44,6 +52,118 @@
}
function create_srt_timeline(jsPsych){
+
+ const instructions = {
+ timeline: [
+ {
+ type: jsPsychSerialReactionTime,
+ choices: [['c', 'g', 'h', 'j']],
+ target: [0,0],
+ target_color: 'white',
+ prompt: `
+
In this experiment the goal is to see how fast you can respond to a cue.
+
Press C to continue.
+
+ `,
+ simulation_options: ()=>{
+ return jsPsych.getProgress().current_trial_global.toString();
+ }
+ },
+ {
+ type: jsPsychSerialReactionTime,
+ choices: [['f', '', '', '']],
+ target: [0,0],
+ show_response_feedback: true,
+ prompt: `
+
One of the squares above will change color.
+
Use the keys F G H J to respond.
+
Press F for the 1st square (press F now).
+
+ `,
+ simulation_options: ()=>{
+ return jsPsych.getProgress().current_trial_global.toString();
+ }
+ },
+ {
+ type: jsPsychSerialReactionTime,
+ choices: [['', 'g', '', '']],
+ target: [0,1],
+ show_response_feedback: true,
+ prompt: `
+
Press G for the 2nd square (press G now).
+
+ `,
+ simulation_options: ()=>{
+ return jsPsych.getProgress().current_trial_global.toString();
+ }
+ },
+ {
+ type: jsPsychSerialReactionTime,
+ choices: [['', '', 'h', '']],
+ target: [0,2],
+ show_response_feedback: true,
+ prompt: `
+
Press H for the 3rd square (press H now).
+
+ `,
+ simulation_options: ()=>{
+ return jsPsych.getProgress().current_trial_global.toString();
+ }
+ },
+ {
+ type: jsPsychSerialReactionTime,
+ choices: [['', '', '', 'j']],
+ target: [0,3],
+ show_response_feedback: true,
+ prompt: `
+
Press J for the 4th square (press J now).
+
+ `,
+ simulation_options: ()=>{
+ return jsPsych.getProgress().current_trial_global.toString();
+ }
+ },
+ {
+ type: jsPsychSerialReactionTime,
+ choices: [['f', '', '', '']],
+ target: [0,3],
+ show_response_feedback: true,
+ prompt: `
+
The squares will change color to show you if you responded correctly.
+
Press F to make the wrong response on this example.
+
+ `,
+ simulation_options: ()=>{
+ return jsPsych.getProgress().current_trial_global.toString();
+ }
+ },
+ {
+ type: jsPsychSerialReactionTime,
+ choices: [['f', 'g', 'h', 'j']],
+ target: [0,0],
+ target_color: 'white',
+ prompt: `
+
When you are ready to start, press F G H or J to begin.
+
+ `,
+ simulation_options: ()=>{
+ return jsPsych.getProgress().current_trial_global.toString();
+ }
+ },
+ {
+ type: jsPsychSerialReactionTime,
+ choices: ['null', 'null1', 'null2', 'null3'],
+ target: [0,0],
+ target_color: 'white',
+ trial_duration: 1500,
+ simulation_options: ()=>{
+ return jsPsych.getProgress().current_trial_global.toString();
+ }
+ },
+ ]
+
+ }
+
const srt = {
timeline: [
{
@@ -51,6 +171,9 @@
choices: [['f','g','h','j']],
target: jsPsych.timelineVariable('target'),
show_response_feedback: true,
+ data: {
+ task: 'respond'
+ },
simulation_options: ()=>{
return jsPsych.getProgress().current_trial_global.toString();
},
@@ -72,13 +195,7 @@
}
}
- const end = {
- type: jsPsychHtmlButtonResponse,
- stimulus: '',
- choices: ['Watch replay']
- }
-
- const timeline = [srt, end];
+ const timeline = [instructions, srt];
return timeline;
}