forked from Qlab-UDel/SL-experiments
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfront_page.html
104 lines (77 loc) · 3.07 KB
/
front_page.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
<!DOCTYPE html>
<html>
<head>
<title>Front Page</title>
<link href="front_page.css" rel="stylesheet">
</head>
<body>
<h1><center>Cognitive Science Games</center></h1>
<p>Welcome! Today we're going to play two games with our alien friends. During these games, we will be playing some sounds. Please make sure you have the following: </p>
<p>1. A set of headphones or earphones</p>
<p>2. A quiet room with few or no distractions</p>
<p>3. About 20 minutes of uninterrupted time to play both games</p>
<p>To test your volume to make sure it is at a good level, please press the play button on the audio clip below (you should hear the "Happy Birthday" song!)</p>
<audio controls>
<source src="../../toneSLjspsych/happy_birthday.wav"
type='audio/mp4'>
</audio>
<p>You're going to play two games, click on the button below and one of them will start, after it is done the other will automatically follow. Have fun!</p>
<script>
var arraylist = ['v', 't','s','l'];
window.sessionStorage.setItem("list_data_key", JSON.stringify(arraylist));
var qq = function () {
var rand_exp = ['v', 't','s','l'];
var pick_exp = function(expType) {
return expType[Math.floor(Math.random()*expType.length)];
};
var exp = pick_exp(rand_exp);
if (exp === 'v'){
arraylist = JSON.parse(window.sessionStorage.getItem("list_data_key"));
var i = arraylist.indexOf("v");
if(i != -1) {
arraylist.splice(i, 1);
}
window.sessionStorage.setItem("list_data_key", JSON.stringify(arraylist));
return window.location.replace('../expf/deep/vsl.html');
}
if (exp === 't'){
arraylist = JSON.parse(window.sessionStorage.getItem("list_data_key"));
var i = arraylist.indexOf("t");
if(i != -1) {
arraylist.splice(i, 1);
}
window.sessionStorage.setItem("list_data_key", JSON.stringify(arraylist));
return window.location.replace('../expf/deep/tsl.html');
}
if (exp === 'l'){
arraylist = JSON.parse(window.sessionStorage.getItem("list_data_key"));
var i = arraylist.indexOf("l");
if(i != -1) {
arraylist.splice(i, 1);
}
window.sessionStorage.setItem("list_data_key", JSON.stringify(arraylist));
return window.location.replace('lsl_test.html');
}
if (exp === 's'){
arraylist = JSON.parse(window.sessionStorage.getItem("list_data_key"));
var i = arraylist.indexOf("s");
if(i != -1) {
arraylist.splice(i, 1);
}
window.sessionStorage.setItem("list_data_key", JSON.stringify(arraylist));
return window.location.replace('../SSL_Exp/ssl.html');
}
}
var storedArray = JSON.parse(window.sessionStorage.getItem("list_data_key"));
console.log(storedArray);
</script>
<div id="parent">
<div id="wide">
<div class="button1">
<a href="javascript:qq()" >Start our experiment</a>
</div>
</div>
<footer id="foot01"></footer>
<!-- <script src="front_page.js"></script> -->
</body>
</html>