Skip to content

Instantly share code, notes, and snippets.

@susanBuck
Created October 13, 2025 16:50
Show Gist options
  • Select an option

  • Save susanBuck/f4c5929010ff6c3e8d8412a9b948d200 to your computer and use it in GitHub Desktop.

Select an option

Save susanBuck/f4c5929010ff6c3e8d8412a9b948d200 to your computer and use it in GitHub Desktop.
Code Chat 1
// Welcome
let welcomeTrial = {
type: jsPsychHtmlKeyboardResponse,
stimulus: `
<h1 class='welcomeHeader'>Welcome!</h1>
<p>In this experiment, you will be shown a series of words.</p>
<p>Press the letter <span class='key'>F</span> if the word is positive.</p>
<p>Press the letter <span class='key'>J</span> if the word is negative.</p>
<p>Press <span class='key'>SPACE</span> to begin.</p>
`,
choices: [' '],
};
timeline.push(welcomeTrial);
let conditions = [
{ word: 'peace', valence: 'positive' },
{ word: 'laugh', valence: 'positive' },
{ word: 'sunny', valence: 'positive' },
{ word: 'addict', valence: 'negative' },
{ word: 'battle', valence: 'negative' },
{ word: 'famish', valence: 'negative' },
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment