-
Notifications
You must be signed in to change notification settings - Fork 12
/
content.html
222 lines (212 loc) · 9.75 KB
/
content.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
<!DOCTYPE html>
<html lang="en" style="height:100%">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>EmulatorJS</title>
<link rel="prefetch" href="extractor-new.js" />
<link rel="prefetch" href="extractor-new.wasm" />
<style>
body {
font-family: Avenir, "Avenir Next", "Helvetica Neue", "Segoe UI", Helvetica, Arial, sans-serif;
}
@keyframes pulse {
from {}
to {
box-shadow: 1px 3px 15px 8px #222222,
0px 7px 10px 0px #111111,
inset 0px 0px 1px 0px rgba(250, 250, 250, 0.2),
inset 8px 5px 35px 0px rgba(0, 0, 0, 0.5);
}
}
#ejs-start-game {
display: flex;
justify-content: center;
text-shadow: 1px 1px 2px rgb(0 0 0);
font-size: 20px;
line-height: 45px;
text-transform: uppercase;
font-weight: bolder;
position: relative;
text-decoration: none;
width: 200px;
height: 45px;
border: 0;
color: #fff !important;
border-radius: 35px;
text-align: center;
background-color: rgb(26, 175, 255)
}
#ejs-start-game:hover {
animation: pulse 1.2s linear infinite alternate;
}
.frame-2 {
position: absolute;
left: 50%;
top: 50%;
z-index: 1;
transform: translate(-50%, -50%);
}
#disc-list a {
background: rgb(26, 175, 255);
display: block;
padding: 10px;
margin-top: 5px;
border-radius: 0;
color: #fff;
text-decoration: none;
}
.ad-close {
display: none;
position: absolute;
width: 20px;
height: 20px;
right: 0px;
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADcAAAA3CAYAAACo29JGAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTMyIDc5LjE1OTI4NCwgMjAxNi8wNC8xOS0xMzoxMzo0MCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo1RENCQTc3MUQ0NTJFQTExOEJCMkM1NjkyREZDQUY1MiIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpGNjFGODgzMzRDQTAxMUVBOTk0NTg3MDkxMzcwM0Q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C/KfxwjazUbYL4ioOf/n0wA20jXTDWityGD1yXLDqjLoGVQqyTPA01bro85mt7j5zQnXkfaEQv2VpG0htiCshbzLdndLJ/Q+Q98hk9bKPw8QJdgdEJ/FMGtDE/NliqoBvjZMRjTVb5N40bo46bU5rxTDdAlGN9gn8zX3PHDh89IjQE9381O/WTkb0TfPUvNDtz1e6CZKnnboGcO6uQch65s7rxR0Q840WvZHGu5P6T1UhbfoMo8dtY8qJsSeP3BJ/F3QoYrsOugN44Bk3jdEie+ksOu6AWc6HW1ieXl+Q8FC2vLICsPV4AdpKyEbFfQoVlwZ8DhvhrgjAFcnnijT+3ntjHjhsWW8wLOg6Ytt4DlzIpwd4nXy0bX9AJO9KZgcbLdyYpwafIGBwwBOzVWMqaDySTxX0Zl3q9FvGGhzvwnLeRcY7yaay9LWq+vjuB4q+3Rcw3ZjavE9mJ1AJYgx2zjKmcF/OaJkINFyQi5KTZGtT8VyR4vzG71OyQYIKt6hBUjByKfDN19rpQn48PNoCerXcRRW1aNIKjh0fERnbB1zsQz5IB9lZ6gXKBy5NCjfNagp1JYlgBu4Fn5RYEVyCpk87wAhCBxKLvkDCxfY6gYRirxNK/Si4JU0I2H/7SCRA3AskK9JdUTX51DvllS0RFWFncA1YthGLSu0VpE7eXIjpdXPCebazQC50aEgDa+1g1s66Z2UMBVOE3s+z30QrUrLp8KGA24L5S1hvEmWs9oI1KWhfoOo1MoK8k/wGjZCugv/taCzqgeyf2HoKeg+xgaHJoYZxbSOwgawBjndsX/bWHo7wpeD8IYwC3z/iZPzsoikaiQ9wuhXruq/J8AAwCBn63sktnpgwAAAABJRU5ErkJggg==) no-repeat;
background-size: 100%;
background-color: #999;
border-radius: 50%;
}
</style>
</head>
<body style="border:none;margin:0;height: 100%;width: 100%;">
<div class style="height: 100%;">
<iframe id="game-frame" src="game.html" width="100%" height="100%" frameborder="no" allowtransparency="true"
allowfullscreen="true" webkitallowfullscreen="true" mozallowfullscreen="true" scrolling="no"></iframe>
<div class="frame-2">
<iframe src="ad.html?domain=" width="300px" height="250px" frameborder="no" scrolling="no"
sandbox="allow-forms allow-modals allow-orientation-lock allow-pointer-lock allow-popups allow-popups-to-escape-sandbox allow-presentation allow-same-origin allow-scripts"></iframe>
<a href="#" class="ad-close"></a>
</div>
<div style="position: absolute;bottom: 20px;left: 50%;transform: translateX(-50%);z-index: 1;"><a href="#"
id="ejs-start-game" style="display:none">Play Now</a></div>
<div id="select-disc"
style="display:none;position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);z-index: 1;background: rgba(0,0,0,0.8);max-width: 300px;color: #fff;min-width: 200px;text-align: center;font-weight: 700;">
<div style="padding:10px">
<h3>Select Disc</h3>
<ul id="disc-list" style="list-style: none;margin: 0;padding: 0;"></ul>
</div>
</div>
</div>
<script>
let gameFrameReady = false;
let initSent = false;
let gameFrame = document.querySelector('#game-frame');
let options = {};
let script = '';
let settings = {};
let url = '';
window.addEventListener('message', function (e) {
if (typeof e.data == 'object') {
if (e.data.act == 'ejs-setup' && e.source == window
.parent) {
options = e.data.options;
script = e.data.script;
settings = e.data.settings;
if (typeof settings == 'object') {
Object.keys(settings).forEach(function (k, i) {
try {
if (!localStorage.getItem(k) && settings[k]) {
localStorage.setItem(k, settings[k]);
}
} catch (e) {}
});
}
if (options.color) {
document.querySelector('#ejs-start-game').style.backgroundColor = options.color;
}
if (gameFrameReady && !initSent) {
gameFrame.contentWindow.postMessage({
'act': 'ejs-game-init',
'options': options,
'script': script
}, '*');
initSent = true;
}
}
if (e.data.act == 'ejs-gameframe-ready' && e.source ==
gameFrame.contentWindow) {
gameFrameReady = true;
if (!initSent) {
gameFrame.contentWindow.postMessage({
'act': 'ejs-game-init',
'options': options,
'script': script
}, '*');
initSent = true;
}
document.querySelector('#ejs-start-game').style
.display = 'block';
}
if (e.data.act == 'ejs-game-started') {
if (e.source != gameFrame.contentWindow)
return false;
document.querySelector('.ad-close').style
.display = "inline-block";
document.querySelector('.ad-close').onclick =
function () {
document.querySelector(
'.frame-2')
.style.display = 'none';
return false;
};
window.parent.postMessage({
'act': 'ejs-game-started'
}, '*');
setTimeout(function () {
document.querySelector(
'.frame-2'
).style
.display =
'none';
}, 15000);
}
if (e.data.act == 'ejs-enterfullscreen' && e.source ==
window.parent) {
gameFrame.contentWindow.postMessage({
'act': 'ejs-enterfullscreen'
}, '*');
}
if (e.data.act == 'ejs-exitfullscreen' && e.source ==
window.parent) {
gameFrame.contentWindow.postMessage({
'act': 'ejs-exitfullscreen'
}, '*');
}
if (e.data.act == 'ejs-idb-1' && e.source == window
.parent) {
gameFrame.contentWindow.postMessage({
'act': 'ejs-idb-1',
'path': e.data.path,
'data': e.data.data
}, '*');
}
if (e.data.act == 'ejs-ready-start' && e.source ==
window.parent) {
gameFrame.contentWindow.postMessage({
'act': 'ejs-ready-start',
'args': e.data.args
}, '*');
}
}
});
document.querySelector('#ejs-start-game').style.display = 'none';
window.parent.postMessage({
'act': 'ejs-ready'
}, '*');
document.querySelector('#ejs-start-game').onclick = function () {
gameFrame.contentWindow.postMessage({
'act': 'ejs-game-start'
}, '*');
if (document.querySelector('#ejs-start-game').remove) {
document.querySelector('#ejs-start-game').remove();
} else {
document.querySelector('#ejs-start-game').parentNode
.removeChild(document.querySelector('#ejs-start-game'));
}
return false;
};
</script>
</body>
</html>