···309309 <div>
310310 <Header as="h1">Trials</Header>
311311 <p>
312312- Edit the name, condition and correct key response of each trial.
312312+ Edit the correct key response and type of each trial.
313313 </p>
314314 </div>
315315
···2424 background_second_column_question: `Fun fact: Brad Pitt claims he has face blindness, but he has not been tested.
2525 Do you know anyone who has face blindness?`,
2626 protocol_title: `What participants are shown`,
2727- protocol: `In the Faces/Houses experiment, you will see pictures of different faces and houses.`,
2727+ protocol: `In the Faces/Houses experiment, participants will see pictures of different faces and houses.`,
2828 protocol_condition_first_img: `conditionFace`,
2929 protocol_condition_first_title: `Faces`,
3030- protocol_condition_first: `When you see a face, press the key “1”.`,
3030+ protocol_condition_first: `When participants see a face, they should press the key “1”.`,
3131 protocol_condition_second_img: `conditionHouse`,
3232 protocol_condition_second_title: `Houses`,
3333- protocol_condition_second: `If you see a house, press “9”.`,
3333+ protocol_condition_second: `If participants see a house, they should press “9”.`,
3434 overview_links: [],
3535 background_links: [
3636 {
+2-2
app/utils/labjs/protocols/multi.js
···2323 background_second_column_question: `Do you think some people could be better brain ‘distributors’ than others?`,
2424 protocol_title: `What participants are shown`,
2525 protocol: `Participants are shown either a square or diamonds with dots inside.
2626- The location of the object on the screen indicates which rule the participant needs to follow`,
2626+ The location of the object on the screen indicates which rule the participant needs to follow.`,
2727 protocol_condition_first_img: `multiConditionShape`,
2828 protocol_condition_first_title: `Rule 1`,
2929- protocol_condition_first: `If the object is shown on top, they need to respond to the shape (pressing ‘n’ for square and ‘b’ for diamond).`,
2929+ protocol_condition_first: `If the object is shown on top, participants need to respond to the shape (pressing ‘n’ for square and ‘b’ for diamond).`,
3030 protocol_condition_second_img: `multiConditionDots`,
3131 protocol_condition_second_title: `Rule 2`,
3232 protocol_condition_second: `If the object is shown on the bottom, they need to respond to the number of dots inside (pressing ‘n’ for 3 dots and ‘b’ for 2 dots). `,
+4-4
app/utils/labjs/protocols/search.js
···2626 Brain scientists aren’t the only ones who are interested in exploring the most optimal way in which visual searches occur.`,
2727 background_second_column_question: `Can you think of who else might want to know this?`,
2828 protocol_title: `What participants are shown`,
2929- protocol: `In the Visual Search Task, your goal is to find the right-side up orange T while ignoring upside-down orange T’s or T’s in other colors.`,
2929+ protocol: `In the Visual Search Task, participants' goal is to find the right-side up orange T while ignoring upside-down orange T’s or T’s in other colors.`,
3030 protocol_condition_first_img: `conditionOrangeT`,
3131 protocol_condition_first_title: `Orange T`,
3232- protocol_condition_first: `If you find the orange T, you should press the ‘b’ key. `,
3232+ protocol_condition_first: `If participants find the orange T, they should press the ‘b’ key. `,
3333 protocol_condition_second_img: `conditionNoOrangeT`,
3434 protocol_condition_second_title: `No orange T`,
3535- protocol_condition_second: `If the orange T is not on the screen, press the ‘n’ key instead.`,
3535+ protocol_condition_second: `If the orange T is not on the screen, participants should press the ‘n’ key instead.`,
3636 overview_links: [],
3737 background_links: [],
3838 protocal_links: [],
···4343 jitter: 200,
4444 sampleType: 'with-replacement',
4545 pluginName: 'callback-image-display',
4646- intro: `You know how difficult it is to find your keys in a messy room! We want to know how good you are in quickly finding your keys! Instead of keys, we just want to know how quickly you can find an orange T amongst blue Ts and upside-down orange Ts. Sounds easy! But it is not at all that easy!`,
4646+ intro: `You know how difficult it is to find your keys in a messy room. We want to know how good you are in quickly finding your keys. Instead of keys, we just want to know how quickly you can find an orange T amongst blue Ts and upside-down orange Ts. Sounds easy! But it is not at all that easy!`,
4747 showProgressBar: false,
4848 stimulus1: {
4949 dir: facesDir,
+3-3
app/utils/labjs/protocols/stroop.js
···2323 (for example, children with Attention-deficit/hyperactivity disorder (ADHD)).`,
2424 background_second_column_question: `You can read more about the Stroop task at Link 1. `,
2525 protocol_title: `What participants are shown`,
2626- protocol: `In the Stroop task, you will see different words written in different colors
2626+ protocol: `In the Stroop task, participants will see different words written in different colors
2727 (e.g., the word “GREEN” may be written in a green-colored font, but it may also be written in a red font).
2828- You will respond only to the color of the font, ignoring the meaning of the word.
2929- If the font is red, press the key ‘r’; if yellow, press ‘y’; if blue, press ‘b’; and if green, press ‘g’.`,
2828+ Participants need to respond only to the color of the font, ignoring the meaning of the word.
2929+ If the font is red, they should press the key ‘r’; if yellow, press ‘y’; if blue, press ‘b’; and if green, press ‘g’.`,
3030 protocol_condition_first_img: `conditionCongruent`,
3131 protocol_condition_first_title: `"Green" written in green`,
3232 protocol_condition_first: `The color is green, so the correct response is ‘g’.`,
+1-1
app/utils/labjs/scripts/stroop.js
···3333 },
3434 title: 'Instruction',
3535 content:
3636- '\u003Cheader class="content-vertical-center content-horizontal-center"\u003E\n \u003Ch1\u003EStroop Task\u003C\u002Fh1\u003E\n\u003C\u002Fheader\u003E\n\n\u003Cmain\u003E\n \u003Cp\u003E\n Welcome to the \u003Cstrong\u003EStroop experiment\u003C\u002Fstrong\u003E!\n \u003C\u002Fp\u003E\n \u003Cp\u003E\n ${this.parameters.intro}\n \u003C\u002Fp\u003E\n \u003Cp\u003E\n To indicate the color of the word, please use the keys \u003Cstrong\u003Er\u003C\u002Fstrong\u003E, \u003Cstrong\u003Eg\u003C\u002Fstrong\u003E, \u003Cstrong\u003Eb\u003C\u002Fstrong\u003E and \u003Cstrong\u003Ey\u003C\u002Fstrong\u003E for \u003Cspan style="color: red;"\u003Ered\u003C\u002Fspan\u003E, \u003Cspan style="color: green;"\u003Egreen\u003C\u002Fspan\u003E, \u003Cspan style="color: blue;"\u003Eblue\u003C\u002Fspan\u003E and \u003Cspan style="color: #ffe32a;"\u003Eyellow\u003C\u002Fspan\u003E, respectively.\n \u003Cbr\u003E\n Please answer quickly, and as accurately as you can.\n \u003C\u002Fp\u003E\n \u003Cp\u003E\n Press the the space bar on your keyboard to start doing the practice trials.\n \u003C\u002Fp\u003E\n \u003Cp\u003E\n If you want to skip the practice trials and go directly to the task, press the "q" button on your keyboard.\n \u003C\u002Fp\u003E\n\u003C\u002Fmain\u003E\n\n\u003Cfooter class="content-vertical-center content-horizontal-center"\u003E\n \n\u003C\u002Ffooter\u003E\n\n\n',
3636+ '\u003Cheader class="content-vertical-center content-horizontal-center"\u003E\n \u003Ch1\u003EStroop Task\u003C\u002Fh1\u003E\n\u003C\u002Fheader\u003E\n\n\u003Cmain\u003E\n \u003Cp\u003E\n Welcome to the \u003Cstrong\u003EStroop experiment\u003C\u002Fstrong\u003E!\n \u003C\u002Fp\u003E\n \u003Cp\u003E\n ${this.parameters.intro}\n \u003C\u002Fp\u003E\n \u003Cp\u003E\n To indicate the color of the word, please use the keys \u003Cstrong\u003Er\u003C\u002Fstrong\u003E, \u003Cstrong\u003Eg\u003C\u002Fstrong\u003E, \u003Cstrong\u003Eb\u003C\u002Fstrong\u003E and \u003Cstrong\u003Ey\u003C\u002Fstrong\u003E for \u003Cspan style="color: red;"\u003Ered\u003C\u002Fspan\u003E, \u003Cspan style="color: green;"\u003Egreen\u003C\u002Fspan\u003E, \u003Cspan style="color: blue;"\u003Eblue\u003C\u002Fspan\u003E and \u003Cspan style="color: #c5ad0b;"\u003Eyellow\u003C\u002Fspan\u003E, respectively.\n \u003Cbr\u003E\n Please answer quickly, and as accurately as you can.\n \u003C\u002Fp\u003E\n \u003Cp\u003E\n Press the the space bar on your keyboard to start doing the practice trials.\n \u003C\u002Fp\u003E\n \u003Cp\u003E\n If you want to skip the practice trials and go directly to the task, press the "q" button on your keyboard.\n \u003C\u002Fp\u003E\n\u003C\u002Fmain\u003E\n\n\u003Cfooter class="content-vertical-center content-horizontal-center"\u003E\n \n\u003C\u002Ffooter\u003E\n\n\n',
3737 parameters: {},
3838 files: {},
3939 },
+32-41
app/utils/labjs/scripts/visualsearch.js
···3232 },
3333 messageHandlers: {},
3434 title: 'Instruction',
3535- content:
3636- '\u003Cstyle\u003E\n .letter{\n font-size: 90px;\n font-weight: bold;\n }\n\u003C\u002Fstyle\u003E\n\n\u003Cheader\u003E\n \u003Ch1\u003EVisual search task\u003C\u002Fh1\u003E\n\u003C\u002Fheader\u003E\n\n\u003Cmain\u003E\n \n \u003Cp\u003E\n ${this.parameters.intro}\n \u003C\u002Fp\u003E\n \n \u003Cp\u003E\n Again, all you need to do is to find an \u003Cb\u003Eorange T\u003C\u002Fb\u003E. If you see the \u003Cb\u003Eorange T\u003C\u002Fb\u003E, press \u003Ckbd\u003Eb\u003C\u002Fkbd\u003E. Ignore the upside-down orange T, as well as blue Ts! IF THERE IS NO ORANGE T, press \u003Ckbd\u003En\u003C\u002Fkbd\u003E.\n It is very important to respond \u003Cb\u003EAS FAST AS YOU CAN\u003C\u002Fb\u003E.\n \u003C\u002Fp\u003E\n \u003Cp\u003E\n Find \n \u003C\u002Fp\u003E\n \u003Cbr\u003E\n \u003Cdiv class="letter" style="color:orange"\u003E\n T\n \u003C\u002Fdiv\u003E\n \u003Cbr\u003E\u003Cbr\u003E\n \u003Cp\u003E\n But do not respond to any of these distractors:\n \u003C\u002Fp\u003E\n \u003Cbr\u003E\n \n \u003Cdiv style="display:grid; grid-template-columns: 100px 50px; justify-content: center"\u003E\n \u003Cdiv class="letter" style="color:lightblue"\u003E\n T\n \u003C\u002Fdiv\u003E\n \u003Cdiv class="letter" style="color:orange; transform: rotate(-180deg)"\u003E\n T\n \u003C\u002Fdiv\u003E\n \u003C\u002Fdiv\u003E\n \n \u003Cbr\u003E\u003Cbr\u003E\n\n \u003Cp\u003E\n Press the space bar on your keyboard to start doing the practice trials.\n If you want to skip the practice trials and go directly to the task, press the "q" button on your keyboard.\n \u003C\u002Fp\u003E\n\u003C\u002Fmain\u003E',
3535+ "content": "\u003Cstyle\u003E\n .letter{\n font-size: 90px;\n font-weight: bold;\n }\n\u003C\u002Fstyle\u003E\n\n\u003Cheader\u003E\n \u003Ch1\u003EVisual search task\u003C\u002Fh1\u003E\n\u003C\u002Fheader\u003E\n\n\u003Cmain\u003E\n \n \u003Cp\u003E\n ${this.parameters.intro}\n \u003C\u002Fp\u003E\n \n \u003Cp\u003E\n Again, all you need to do is to find an \u003Cb\u003Eorange T\u003C\u002Fb\u003E. If you see the \u003Cb\u003Eorange T\u003C\u002Fb\u003E, press \u003Ckbd\u003Eb\u003C\u002Fkbd\u003E. Ignore the upside-down orange T, as well as blue Ts! IF THERE IS NO ORANGE T, press \u003Ckbd\u003En\u003C\u002Fkbd\u003E.\n It is very important to respond \u003Cb\u003EAS FAST AS YOU CAN\u003C\u002Fb\u003E.\n \u003C\u002Fp\u003E\n\n \u003Cdiv style=\"display:grid; grid-template-columns:1fr 1fr;\"\u003E\n \u003Cdiv\u003E\n \u003Cp\u003E\n Find \n \u003C\u002Fp\u003E\n \u003Cbr\u003E\n \u003Cdiv class=\"letter\" style=\"color:orange; height: 100px;\"\u003E\n T\n \u003C\u002Fdiv\u003E\n \u003C\u002Fdiv\u003E\n \u003Cdiv\u003E\n \u003Cp\u003E\n But do not respond to any of these distractors:\n \u003C\u002Fp\u003E\n \u003Cbr\u003E\n \u003Cdiv style=\"display:grid; grid-template-columns: 100px 50px; justify-content: center; \"\u003E\n \u003Cdiv class=\"letter\" style=\"color:lightblue;\"\u003E\n T\n \u003C\u002Fdiv\u003E\n \u003Cdiv class=\"letter\" style=\"color:orange; transform: rotate(-180deg);\"\u003E\n T\n \u003C\u002Fdiv\u003E\n \u003C\u002Fdiv\u003E\n \u003C\u002Fdiv\u003E\n \u003C\u002Fdiv\u003E\n\n \u003Cp\u003E\n Press the space bar on your keyboard to start doing the practice trials.\n If you want to skip the practice trials and go directly to the task, press the \"q\" button on your keyboard.\n \u003C\u002Fp\u003E\n\u003C\u002Fmain\u003E"
3736 },
3837 {
3938 type: 'lab.flow.Loop',
···4948 let practiceTrialParameters = [];
50495150 function shuffle(a) {
5252- var j, x, i;
5151+ let j, x, i;
5352 for (i = a.length - 1; i > 0; i--) {
5453 j = Math.floor(Math.random() * (i + 1));
5554 x = a[i];
···5958 return a;
6059 }
61606262- const randomBetween = (min, max) => {
6363- return Math.floor(Math.random() * (max - min + 1)) + min;
6464- };
6161+ const randomBetween = (min, max) => Math.floor(Math.random() * (max - min + 1)) + min;
65626663 const makeStimuliArray = (arrLen, stLen, isTarget) => {
6767- let arr = Array(arrLen).fill(0);
6868- let shuffled = shuffle([...Array(arrLen).keys()]).slice(0, stLen);
6969- for (let p of shuffled) {
6464+ const arr = Array(arrLen).fill(0);
6565+ const shuffled = shuffle([...Array(arrLen).keys()]).slice(0, stLen);
6666+ for (const p of shuffled) {
7067 if (randomBetween(0, 1) === 0) {
7168 arr[p] = 1;
7269 } else {
···118115 );
119116 }
120117121121- //assign options values to parameters of this task
118118+ // assign options values to parameters of this task
122119 this.options.templateParameters = practiceTrialParameters;
123120 this.options.shuffle = true; // already shuffled before
124121 },
···224221 const taskgrid = document.querySelector('#taskgrid');
225222 const stimuli = this.parameters.stimuli;
226223227227- for (let s of stimuli) {
228228- let d = document.createElement('div');
224224+ for (const s of stimuli) {
225225+ const d = document.createElement('div');
229226 d.classList.add('box');
230230- let el = document.createElement('span');
227227+ const el = document.createElement('span');
231228 el.classList.add('letter');
232229233230 if (s > 0) {
···265262 const taskgrid = document.querySelector('#taskgrid');
266263 const stimuli = this.parameters.stimuli;
267264268268- for (let s of stimuli) {
269269- let d = document.createElement('div');
265265+ for (const s of stimuli) {
266266+ const d = document.createElement('div');
270267 d.classList.add('box');
271271- let el = document.createElement('span');
268268+ const el = document.createElement('span');
272269 el.classList.add('letter');
273270274271 if (s > 0) {
···292289 }
293290294291 if (this.state.response === 'noresponse') {
295295- document.querySelector('#feedback').innerHTML = 'Please respond!';
292292+ document.querySelector('#feedback').innerHTML = 'Please respond.';
296293 return;
297294 }
298295299296 if (this.state.correct) {
300297 document.querySelector('#feedback').innerHTML = 'Well done!';
301298 document.querySelector('#feedback').style.color = 'green';
302302- } else {
303303- if (this.parameters.target === 'yes') {
299299+ } else if (this.parameters.target === 'yes') {
304300 document.querySelector('#feedback').innerHTML = 'Error! There was one!';
305301 document.querySelector('#target').style.border = 'solid';
306302 } else {
307303 document.querySelector('#feedback').innerHTML = 'Error! There was none!';
308304 }
309309- }
310305 },
311306 'before:prepare': function anonymous() {
312307 this.data.trial_number =
313308 1 +
314309 parseInt(this.options.id.split('_')[this.options.id.split('_').length - 2]);
315310316316- this.data.condition = this.parameters.size + ' letters';
311311+ this.data.condition = `${this.parameters.size } letters`;
317312318313 this.data.reaction_time = this.state.duration;
319319- //this.data.target = this.parameters.target;
314314+ // this.data.target = this.parameters.target;
320315321316 if (this.state.response === this.parameters.target) {
322317 this.data.correct_response = true;
···366361 let trialParameters = [];
367362368363 function shuffle(a) {
369369- var j, x, i;
364364+ let j, x, i;
370365 for (i = a.length - 1; i > 0; i--) {
371366 j = Math.floor(Math.random() * (i + 1));
372367 x = a[i];
···376371 return a;
377372 }
378373379379- const randomBetween = (min, max) => {
380380- return Math.floor(Math.random() * (max - min + 1)) + min;
381381- };
374374+ const randomBetween = (min, max) => Math.floor(Math.random() * (max - min + 1)) + min;
382375383376 const makeStimuliArray = (arrLen, stLen, isTarget) => {
384384- let arr = Array(arrLen).fill(0);
385385- let shuffled = shuffle([...Array(arrLen).keys()]).slice(0, stLen);
386386- for (let p of shuffled) {
377377+ const arr = Array(arrLen).fill(0);
378378+ const shuffled = shuffle([...Array(arrLen).keys()]).slice(0, stLen);
379379+ for (const p of shuffled) {
387380 if (randomBetween(0, 1) === 0) {
388381 arr[p] = 1;
389382 } else {
···419412 trialParameters = trialParameters.concat(trialConstructor(i, 20, 'no'));
420413 }
421414422422- //assign options values to parameters of this task
415415+ // assign options values to parameters of this task
423416 this.options.templateParameters = trialParameters;
424417 this.options.shuffle = true; // already shuffled before
425418 },
···524517 const taskgrid = document.querySelector('#taskgrid');
525518 const stimuli = this.parameters.stimuli;
526519527527- for (let s of stimuli) {
528528- let d = document.createElement('div');
520520+ for (const s of stimuli) {
521521+ const d = document.createElement('div');
529522 d.classList.add('box');
530530- let el = document.createElement('span');
523523+ const el = document.createElement('span');
531524 el.classList.add('letter');
532525533526 if (s > 0) {
···565558 const taskgrid = document.querySelector('#taskgrid');
566559 const stimuli = this.parameters.stimuli;
567560568568- for (let s of stimuli) {
569569- let d = document.createElement('div');
561561+ for (const s of stimuli) {
562562+ const d = document.createElement('div');
570563 d.classList.add('box');
571571- let el = document.createElement('span');
564564+ const el = document.createElement('span');
572565 el.classList.add('letter');
573566574567 if (s > 0) {
···599592 if (this.state.correct) {
600593 document.querySelector('#feedback').innerHTML = 'Well done!';
601594 document.querySelector('#feedback').style.color = 'green';
602602- } else {
603603- if (this.parameters.target === 'yes') {
595595+ } else if (this.parameters.target === 'yes') {
604596 document.querySelector('#feedback').innerHTML = 'Error! There was one!';
605597 document.querySelector('#target').style.border = 'solid';
606598 } else {
607599 document.querySelector('#feedback').innerHTML = 'Error! There was none!';
608600 }
609609- }
610601 },
611602 'before:prepare': function anonymous() {
612603 this.data.trial_number =
613604 1 +
614605 parseInt(this.options.id.split('_')[this.options.id.split('_').length - 2]);
615606616616- this.data.condition = this.parameters.size + ' letters';
607607+ this.data.condition = `${this.parameters.size } letters`;
617608618609 this.data.reaction_time = this.state.duration;
619619- //this.data.target = this.parameters.target;
610610+ // this.data.target = this.parameters.target;
620611621612 if (this.state.response === this.parameters.target) {
622613 this.data.correct_response = true;