-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
43 lines (36 loc) · 1.28 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
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1" charset="utf-8"/>
<title>jsPsych RMS</title>
<script src="jspsych.js"></script>
<script src="jspsych-brms.js" type="text/javascript"></script>
<link rel="stylesheet" href="css/jspsych.css" type="text/css"></link>
<script>
function download(filename, text) {
var element = document.createElement('a');
element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text));
element.setAttribute('download', filename);
element.style.display = 'none';
document.body.appendChild(element);
element.click();
document.body.removeChild(element);
}
full_timeline = [];
const one = {
type: "rms",
stimulus: ["2.jpg"],
};
full_timeline.push(one);
jsPsych.init({
timeline: full_timeline,
fullscreen: true,
on_finish: function () {
download("data.csv", jsPsych.data.get().csv());
},
on_trial_start: function () {
console.log("start")
}
});
</script>
</head>
</html>