-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlearntofly.html
116 lines (101 loc) · 2.75 KB
/
learntofly.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
105
106
107
108
109
110
111
112
113
114
115
116
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Unbloxed</title>
<style>
.fullscreen-button {
position: fixed;
left: 50%;
bottom: 20px;
transform: translateX(-50%);
background-color: #333;
color: #00bcd4;
padding: 10px 15px;
border: 1px solid #00bcd4;
border-radius: 5px;
cursor: pointer;
font-size: 16px;
transition: background-color 0.3s, color 0.3s;
}
.fullscreen-button:hover {
background-color: #00bcd4;
color: #333;
}
body {
background: #1e1e2f;
color: #ffffff;
margin: 0;
padding: 0;
font-family: Arial, sans-serif;
}
h1 {
text-align: center;
margin: 20px 0;
color: #00bcd4;
}
iframe {
display: block;
margin: 20px auto;
width: 90%;
max-width: 1450px;
height: 75vh;
border: none;
}
.home-button {
position: fixed;
top: 10px;
right: 10px;
background-color: #333;
color: #00bcd4;
padding: 10px 15px;
border: 1px solid #00bcd4;
border-radius: 5px;
cursor: pointer;
font-size: 16px;
transition: background-color 0.3s, color 0.3s;
}
.home-button:hover {
background-color: #00bcd4;
color: #333;
}
</style>
</head>
<body>
<button class="home-button" onclick="goToHomePage()">Home</button>
<button class="fullscreen-button" onclick="openFullscreen()">Open Fullscreen Game</button>
<h1>Learn To Fly</h1>
<iframe src="https://anon7152877210777.github.io/fullscreenhttps/learntofly.html"></iframe>
<script>
function goToHomePage() {
window.location.href = './index.html';
}
function goToGamePage(game) {
window.location.href = '/' + game.toLowerCase() + '.html';
}
var flexItems = document.getElementsByClassName('flex-item');
for (var i = 0; i < flexItems.length; i++) {
flexItems[i].addEventListener('click', function () {
var gameName = this.textContent.trim().replace(/ /g, "");
goToGamePage(gameName);
});
}
function openFullscreen() {
var newWindow = window.open("https://anon7152877210777.github.io/fullscreenhttps/learntofly.html", "_blank");
newWindow.onload = function() {
var iframe = newWindow.document.querySelector('iframe');
if (iframe.requestFullscreen) {
iframe.requestFullscreen();
} else if (iframe.mozRequestFullScreen) {
iframe.mozRequestFullScreen();
} else if (iframe.webkitRequestFullscreen) {
iframe.webkitRequestFullscreen();
} else if (iframe.msRequestFullscreen) {
iframe.msRequestFullscreen();
}
};
}
</script>
</body>
</html>