Global variables for several components (based on jspsych)
I am programming a study using jspsych. I would love to split the study in several components because I want to allow reloading of the page in some parts of the experiment where participants may have difficulties getting the study run as it requires access to their microphones. However, I do not want them to reload the page during the actual timeline.
Is there a way to set variables globally which I will need in all or most of the components?
I have two versions of my study and depending on a task-variable participants will either see one or the other version. I would like to set this variable once in the beginning but then "transfer" it to the other components where I sometimes have conditional code depending on the version of the experiment.
If there is any other elegant version to solve this issue without having to manually set the version in each component, I would be happy to hear from you.