-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontrol_v1.js
57 lines (50 loc) · 1.16 KB
/
control_v1.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
51
52
53
54
55
56
57
<!DOCTYPE html>
<html>
<body>
var userInput = //string input from simon
userInput.toLowerCase();
if (userInput.substr(0,5)=="simon"){
userIput=userInput.substr(6,userInput.length-6);
while(userInput.length >0){
//scroll down
if(userInput="scroll down"){
scrollTo(0,450);
}
//scroll up
if(userInput="scroll up"){
scrollTo(0,-450);
}
//scroll left
if(userInput="scroll left"){
scrollTo(-200,0);
}
//scroll right
if(userInput="scroll right"){
scrollTo(200,0);
}
//page down
if(userInput="page down"){
scrollTo(0,650);
}
//page up
if(userInput="page up"){
scrollTo(0,-650);
}
//zoomin ..............................
////////copied from internet must be changed
if(userInput=="zoom in"){
if (window.parent.document.body.style.zoom < maxZoom) {
if (window.parent.document.body.style.zoom > 0) {
window.parent.document.body.style.zoom *= zoomFactor;
}else {
window.parent.document.body.style.zoom = startIncZoom;
}
}else {
if (alertEnabled) {
alert("Warning: Max size reached");
}
}
//zoomout....................................................
//click
</body>
</html>