forked from sayofthelor/sz-games.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Flash.html
233 lines (183 loc) · 5.54 KB
/
Flash.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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
<!DOCTYPE html>
<html>
<head>
<script src="https://unpkg.com/@ruffle-rs/ruffle"></script>
<link rel="icon" href="https://github.com/sz-games/home/blob/main/G.png?raw=true">
<title>Sz Games - Flash Player</title>
<meta charset="UTF-8">
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script async src="https://www.googletagmanager.com/gtag/js?id=G-C78TXR0XFK"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-C78TXR0XFK');
</script>
<script src=".GobalSettings.js"></script>
<!--PageScript1-->
<!--script id="CHECK">
function getCookie2(name) {
const cookieName = name + "=";
const cookies = document.cookie.split(';');
for (let i = 0; i < cookies.length; i++) {
let cookie = cookies[i];
while (cookie.charAt(0) === ' ') {
cookie = cookie.substring(1);
}
if (cookie.indexOf(cookieName) === 0) {
return cookie.substring(cookieName.length, cookie.length);
}
}
return '';
}
let Setting14bu = getCookie2("PagePrevent");
function checkPageClose(event) {
event.returnValue = "Prevent Page Close Is Active, You Can Click Off Of This";
}
function checkPageClose2() {
if(Setting14bu==="true") {
window.onbeforeunload = function(event) {
// return a string to prevent the page from closing
event.preventDefault();
return "Prevent Page Close Is Active, You Can Click Off Of This";
};
window.addEventListener("beforeunload", checkPageClose);
}
if(Setting14bu==="false") {
}
}
console.log('CookiePAGE Value: ' + Setting14bu + "SzGames-Scripts Loaded")
checkPageClose2()
</script-->
<!--PageScript1-->
<script>
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('https://sz-games.github.io/service-worker.js');
}
</script>
<link rel="manifest" href="https://sz-games.github.io/manifest.json">
<style>
body {
margin: 0;
overflow: hidden;
font-family: Arial, Helvetica, sans-serif;
background-color: rgb(117, 117, 117);
}
.btn-group button {
background-color: black; /* Green background */
color: white; /* White text */
padding: 10px 24px; /* Some padding */
cursor: pointer; /* Pointer/hand icon */
float: left; /* Float the buttons side by side */
}
/* Clear floats (clearfix hack) */
.btn-group:after {
content: "";
clear: both;
display: table;
}
.btn-group button:not(:last-child) {
border-right: none; /* Prevent double borders */
}
/* Add a background color on hover */
.btn-group button:hover {
background-color: grey;
}
/* Header/Logo Title */
.header {
padding: 60px;
text-align: center;
background: linear-gradient(to bottom right, #9a9a9a, rgb(39, 39, 39));
color: white;
width: auto;
font-size: 30px;
font-family: Arial, Helvetica, sans-serif;
border-radius: 15px;
}
/* Page Content */
</style>
</head>
<body onresize="resize()">
<style>
.game {
position: absolute;
color: white;
transform: scale(1.8);
z-index: 3;
font-family: Arial, Helvetica, sans-serif;
}
.fade {
position: absolute;
background: linear-gradient(to bottom, #1d1d1d, #1d1d1d5d, rgba(39, 39, 39, 0));
width: 300px;
height: 150px;
border-radius: 15px;
}
.buttonForMenu {
transition: 0.5s;
}
.buttonForMenu:hover {
color: #9a9a9a;
}
.em {
margin: 0 auto;
}
</style>
<div id="hello">
<embed class="em" id="game" width=" 100%;" height="550px" src="" ></embed>
</div>
<div style="cursor: pointer; position: fixed; border-radius: 15px; color: rgb(224, 224, 224); background-color: #1d1d1dc0; left: 0; bottom: 0px; margin: 10px;" id="Menu">
<span class="material-icons buttonForMenu" style="margin: 5px;" onclick="window.location = 'https://sz-games.github.io'" >
arrow_back
</span>
<span class="material-icons buttonForMenu" style="margin: 5px;" onclick="makeFullScreen()" >
fullscreen
</span>
</div>
</body>
<script>
var isFUll = false
document.body.onkeyup = function(e) {
if( e.keyCode == 27 ) {
if(isFUll) {
//document.getElementById('game').style.width = '800px';
}
}
}
function requestFullScreen(element) {
// Supports most browsers and their versions.
var requestMethod = element.requestFullScreen || element.webkitRequestFullScreen || element.mozRequestFullScreen || element.msRequestFullscreen;
if (requestMethod) { // Native full screen.
requestMethod.call(element);
let hh = window.innerHeight;
document.getElementById('game').height = hh;
} else if (typeof window.ActiveXObject !== "undefined") { // Older IE.
var wscript = new ActiveXObject("WScript.Shell");
if (wscript !== null) {
wscript.SendKeys("{F11}");
}
}
}
var canvas = document.getElementById('hello');
function makeFullScreen() {
isFUll = true
requestFullScreen(canvas);
}
let hh = window.innerHeight;
document.getElementById('game').height = hh;
document.getElementById('game').height = hh;
window.onresize = function(event) {
let hh = window.innerHeight;
document.getElementById('game').height = hh;
}
var textElement = document.getElementById("game");
// Get the current URL
var currentUrl = new URL(window.location.href);
// Check for the presence of the "text" parameter in the URL
if (currentUrl.searchParams.has("game")) {
// Set the text of the element to the value of the "text" parameter
textElement.src = currentUrl.searchParams.get("game");
}
</script>
</html>