-
Notifications
You must be signed in to change notification settings - Fork 0
/
exp.html
42 lines (31 loc) · 1.1 KB
/
exp.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
<!DOCTYPE html>
<html>
<head>
<script>
document.addEventListener('DOMContentLoaded', function() {
let url= new URL(window.location.href);
let params = new URLSearchParams(url.search);
var group=window.localStorage.getItem('group')
var stage=parseInt(window.localStorage.getItem('stage'))
if(isNaN(parseInt(params.get('stage')))==false) stage=parseInt(params.get('stage'))
if(params.get('group')) group=params.get('group')
console.log(group,stage)
window.localStorage.setItem('group',group)
window.localStorage.setItem('stage',stage)
if(stage==1) goto('oddball.html?stage=1')
if(group=='N' && stage==2) goto('lecture.html')
else if (group=='M' && stage==2) goto('kirtan.html')
else if(stage==3) goto(`contemplate.html`)
else if(stage==4) goto('oddball.html?stage=4')
else if(stage >=5) goto('end.html')
else if(stage==0) goto('index.html')
// else if(!stage) goto('/error.html')
});
function goto(url)
{
window.location.href=url
}
</script>
</head>
<body></body>
</html>