Skip to content

Commit b2063de

Browse files
committed
updated adaptive_n_back
1 parent 3129c26 commit b2063de

File tree

2 files changed

+1
-39
lines changed

2 files changed

+1
-39
lines changed

adaptive_n_back/config.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"static/js/jspsych/poldrack_plugins/jspsych-poldrack-single-stim.js",
1414
"static/js/jspsych/plugins/jspsych-survey-text.js",
1515
"static/js/jspsych/plugins/jspsych-call-function.js",
16+
"static/js/utils/poldrack_utils.js",
1617
"experiment.js",
1718
"static/css/jspsych.css",
1819
"static/css/default_style.css",

adaptive_n_back/experiment.js

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,6 @@
11
/* ************************************ */
22
/* Define helper functions */
33
/* ************************************ */
4-
// Class to track focus shifts during experiment
5-
var focus_tracker = function(win) {
6-
var self = this
7-
this.shift_away = 0;
8-
9-
this.add_shift = function() {
10-
this.shift_away += 1
11-
},
12-
13-
this.get_shifts = function() {
14-
return this.shift_away;
15-
},
16-
17-
this.reset = function() {
18-
this.shift_away = 0
19-
},
20-
21-
$(win).blur(function(){
22-
self.add_shift()
23-
});
24-
}
25-
26-
var focuser = new focus_tracker(window)
27-
28-
29-
function getDisplayElement() {
30-
$('<div class = display_stage_background></div>').appendTo('body')
31-
return $('<div class = display_stage></div>').appendTo('body')
32-
}
33-
34-
function addID(exp_id) {
35-
var isFullScreen = document.mozFullScreen || document.webkitIsFullScreen || (!window.screenTop && !window.screenY)
36-
jsPsych.data.addDataToLastTrial({
37-
exp_id: exp_id,
38-
full_screen: isFullScreen,
39-
focus_shifts: focuser.get_shifts()
40-
})
41-
}
42-
434
function evalAttentionChecks() {
445
var check_percent = 1
456
if (run_attention_checks) {

0 commit comments

Comments
 (0)