File tree Expand file tree Collapse file tree 2 files changed +1
-39
lines changed Expand file tree Collapse file tree 2 files changed +1
-39
lines changed Original file line number Diff line number Diff line change 13
13
" static/js/jspsych/poldrack_plugins/jspsych-poldrack-single-stim.js" ,
14
14
" static/js/jspsych/plugins/jspsych-survey-text.js" ,
15
15
" static/js/jspsych/plugins/jspsych-call-function.js" ,
16
+ " static/js/utils/poldrack_utils.js" ,
16
17
" experiment.js" ,
17
18
" static/css/jspsych.css" ,
18
19
" static/css/default_style.css" ,
Original file line number Diff line number Diff line change 1
1
/* ************************************ */
2
2
/* Define helper functions */
3
3
/* ************************************ */
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
-
43
4
function evalAttentionChecks ( ) {
44
5
var check_percent = 1
45
6
if ( run_attention_checks ) {
You can’t perform that action at this time.
0 commit comments