-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
125 lines (115 loc) · 4.54 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<!DOCTYPE html>
<!--
This file for github pages
see https://labneurocogdevel.github.io/slipstask
-->
<html>
<head>
<meta charset="UTF-8">
<title>Fabulious Fruits</title>
<!-- all of this also in ./templates/exp.html -->
<link rel="stylesheet" href="static/css/bootstrap.min.css" type="text/css" />
<link rel="stylesheet" href="static/js/jspsych/css/jspsych.css" type="text/css" />
<link rel="stylesheet" href="static/css/style.css" type="text/css" />
<link rel="stylesheet" href="static/css/task.css" type="text/css" />
<script src="static/lib/jquery-3.4.1.min.js" type="text/javascript"> </script>
<script src="static/lib/underscore-min.js" type="text/javascript"> </script>
<script src="static/lib/backbone-min.js" type="text/javascript"> </script>
<script src="static/lib/d3.v3.min.js" type="text/javascript"> </script>
<script src="static/js/jspsych/jspsych.js" type="text/javascript"></script>
<script src="static/js/jspsych/plugins/jspsych-instructions.js" type="text/javascript"></script>
<script src="static/js/jspsych/plugins/jspsych-html-keyboard-response.js" type="text/javascript"></script>
<script src="static/js/jspsych/plugins/jspsych-survey-text.js" type="text/javascript"></script>
<script src="static/js/jspsych/plugins/jspsych-survey-multi-choice.js" type="text/javascript"></script>
<script src="static/js/jspsych/plugins/jspsych-html-slider-response.js" type="text/javascript"></script>
<script src="static/js/utils.js" type="text/javascript"> </script>
<script src="static/js/instructions.js" type="text/javascript"> </script>
<script src="static/js/task.js" type="text/javascript"> </script>
<script type="text/javascript">
DEBUG=true;
/* small versions for exploring */
const scoretl = mkScoreFbk(); // tl = timeline
IDTL = allID;
ODTL = allOD;
SOATL = SOADDtl['SOA'];
DDTL = SOADDtl['DD'];
function trials(timeline){
jsPsych.init({timeline: timeline,
display_element: jsp,
preload_images: ['static/images/box_closed.png',
'static/images/box_open_sm.gif',
Object.values(FRTS).map(f=>f.img)].flat(),
on_finish: function() {
trials(timeline)}});
}
function showInstructions(inst){
const inst_str = INSTRUCTIONS_DATA[inst];
var inst_t = mkInstruction(inst_str);
trials([inst_t]);
}
function fdbktl(score) {
const p = {
type: 'html-keyboard-response',
stimulus: 'temp',
trial_duration: 0.01,
choices: jsPsych.ANY_KEY,
on_finish: function(data) {
data.score=score;
data.outcome='apple' },
};
var f=mkIDFbk(FRTS);
f.trial_duration = 99999;
trials([p, f]);
}
const shortSurveyTL = [mkFrtSurvey(boxes[0].S),
mkConfSlider(),
mkPairSurvey(boxes[0].S, boxes),
mkConfSlider(),
debrief_trial];
function init(){
if(DEBUG) console.log(showSRO(boxes).map(x=>x[0]+":"+x[1]+"-"+x[2]).join("\n"))
trials(surveyTL);
//fdbktl(1);
//showInstructions('OD_wf');
//trials(fullTL);
}
</script>
</head>
<body onload="init()">
<div> links:
<a href="https://github.com/LabNeuroCogDevel/slipstask"> repo</a> |
<a href="https://ff-lncd.herokuapp.com/">heroku</a> |
<a href="practice.html">practice</a> |
</div>
<div> trials:
<a href="#" onclick="trials(TIMELINE)"> fulltask </a> |
<a href="#" onclick="trials(IDTL)"> ID</a> |
<a href="#" onclick="trials(ODTL)"> OD</a> |
<a href="#" onclick="trials(SOATL)"> SOA</a> |
<a href="#" onclick="trials(DDTL)"> DD</a> |
<a href="#" onclick="trials(surveyTL)"> survey</a> |
<a href="#" onclick="trials([debrief_trial])"> done</a>
</div>
<div>ID feedback:
<a href="#" onclick="fdbktl(0)">0</a> |
<a href="#" onclick="fdbktl(1)">1</a> |
</div>
<div> instructions:
<a href="#" onclick="showInstructions('ID_wf')"> ID</a> |
<a href="#" onclick="showInstructions('OD_wf')"> OD</a> |
<a href="#" onclick="showInstructions('SOA_wf')"> SOA</a> |
<a href="#" onclick="showInstructions('DD_wf')"> DD</a> |
<a href="#" onclick="showInstructions('survey')"> suvery</a>
(orig:
<a href="#" onclick="showInstructions('ID')"> ID</a> |
<a href="#" onclick="showInstructions('OD')"> OD</a> |
<a href="#" onclick="showInstructions('SOA')"> SOA</a> |
<a href="#" onclick="showInstructions('DD')"> DD</a>
)
</div>
<br><br>
<div>
<div id="jsp"> </div>
</div>
</body>
</html>