-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
45 lines (45 loc) · 1.47 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
<!DOCTYPE html>
<html>
<meta charset="utf-8" />
<head>
<noscript>Your browser does not support JavaScript!</noscript>
<script type="text/javascript" src="scripts/isMobile.js"></script>
<script type="text/javascript">
function getQueryVariable(variable) {
// From here:
//https://stackoverflow.com/questions/2090551/parse-query-string-in-javascript
var query = window.location.search.substring(1);
var vars = query.split('&');
for (var i = 0; i < vars.length; i++) {
var pair = vars[i].split('=');
if (decodeURIComponent(pair[0]) == variable) {
return decodeURIComponent(pair[1]);
}
}
console.log('Query variable \'%s\' not found', variable);
}
var win_loc_st = 'ui/';
if (isMobile.any()){
win_loc_st = win_loc_st + 'touch';
}
else {
// TODO make choice of screen_kb or screen_kb_vid via query string
win_loc_st = win_loc_st + 'screen';
if (getQueryVariable('method')=='btn') {
win_loc_st = win_loc_st + '_btn';
}
else if (getQueryVariable('method')=='kb') {
win_loc_st = win_loc_st + '_kb';
}
else {
win_loc_st = win_loc_st + '_btn';
}
}
if (getQueryVariable('vid')=='true') {
win_loc_st = win_loc_st + '_vid';
}
win_loc_st = win_loc_st + '.html';
window.location=win_loc_st;
</script>
</head>
</html>