function afterKeyboardResponse(info) {
        first_stim_info = info;
        showBlankScreen();
      }
jspsych-same-different
Josh de Leeuw

plugin for showing two stimuli sequentially and getting a same / different judgment

documentation: docs.jspsych.org