forked from magpie-ea/magpie-departure-point
-
Notifications
You must be signed in to change notification settings - Fork 0
/
06_main.js
50 lines (47 loc) · 1.87 KB
/
06_main.js
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
// In this file you initialize and configure your experiment using magpieInit
$("document").ready(function() {
// prevent scrolling when space is pressed
window.onkeydown = function(e) {
if (e.keyCode === 32 && e.target === document.body) {
e.preventDefault();
}
};
// calls magpieInit
// in debug mode this returns the magpie-object, which you can access in the console of your browser
// e.g. >> window.magpie_monitor or window.magpie_monitor.findNextView()
// in all other modes null will be returned
window.magpie_monitor = magpieInit({
// You have to specify all views you want to use in this experiment and the order of them
views_seq: [
screening,
instructions,
entity_choice,
entity_choice_gld,
post_test,
thanks,
],
// Here, you can specify all information for the deployment
deploy: {
experimentID: "1",
serverAppURL: "https://nel-data-collection.herokuapp.com/api/submit_experiment/",
// Possible deployment methods are:
// "debug" and "directLink"
// As well as "MTurk", "MTurkSandbox" and "Prolific"
deployMethod: "MTurk",
contact_email: "lorr1@cs.stanford.edu",
// prolificURL: "https://app.prolific.ac/submissions/complete?cc=SAMPLE1234"
},
// Here, you can specify how the progress bar should look like
progress_bar: {
in: [
// list the view-names of the views for which you want a progress bar
// forced_choice_2A.name,
// entity_choice.name,
// entity_choice_gld.name
],
// Possible styles are "default", "separate" and "chunks"
style: "separate",
width: 100
}
});
});