Ending the experiment when participants do not agree to participate

If you try to run https://run.pavlovia.org/Wake/ebbinghaus-darts/html

you’ll see the effects of this JS code

mouseloc = mouse.getPos();
if (((mouseloc[0] === mouserec[0]) && (mouseloc[1] === mouserec[1]))) {
} else {
    if ((rec.contains(mouse) && (expInfo["researcher"] === "12345678"))) {
        mouserec = mouseloc;
        continueRoutine = false;
    } else {
        if (rec.contains(mouse)) {
            psychoJS.quit({message: 'Please click to go to the participant information sheet'});
        }
    }
}
1 Like