-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
136 lines (128 loc) · 4.03 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Luxodd Games</title>
<style>
body {
margin: 0;
overflow: hidden;
height: 100vh;
width: 100vw;
display: flex;
align-items: center;
justify-content: center;
background-color: #000;
}
iframe {
width: 100vw;
height: 100vh;
animation: showSlow 2s forwards;
transition: transform 0.2s ease, border-color 0.2s ease;
scale: 1.5;
margin-top: 55px;
}
#container {
position: relative;
width: 100vw;
height: 100vh;
}
#game_drop {
width: 102vw;
height: 100vh;
border: none;
}
#info-box {
position: absolute;
z-index: 9999;
top: 200px;
right: 80px;
background: rgba(0, 0, 0, 0.7);
border-radius: 50px;
color: white;
padding: 10px;
font-family: Arial, sans-serif;
display: flex;
align-items: center;
animation: pulse 1.5s infinite;
outline: red;
}
#info-box span {
color: red;
font-family: monospace, sans-serif;
font-weight: bold;
margin-top: 2px;
font-size: 20px;
}
@keyframes pulse {
0% { transform: scale(1); opacity: 0.8; }
50% { transform: scale(1.1); opacity: 1; }
100% { transform: scale(1); opacity: 0.7; }
}
#close-btn {
background: red;
color: white;
border: none;
padding: 14px;
margin-left: 10px;
cursor: pointer;
font-weight: bold;
border-radius: 50px;
padding-inline: 17px;
font-size: 18px;
padding-block: 12px;
font-family: monospace, sans-serif;
outline: red;
}
</style>
</head>
<body>
<div id="container">
<div id="info-box">
Press <span> X </span> to go out
<button id="close-btn">X</button>
</div>
<iframe
id="game_drop"
frameborder="0"
allowfullscreen="true"
scrolling="no"
allowtransparency="true"
webkitallowfullscreen="true"
mozallowfullscreen="true"
msallowfullscreen="true"
src="https://html-classic.itch.zone/html/9914874/index.html"
allow="autoplay; fullscreen *; geolocation; microphone; camera; midi; monetization; xr-spatial-tracking; gamepad; gyroscope; accelerometer; xr; cross-origin-isolated; web-share">
</iframe>
</div>
<script>
function redirectToLuxodd() {
window.location.href = "https://app.luxodd.com";
}
document.getElementById("close-btn").addEventListener("click", redirectToLuxodd);
document.addEventListener("keydown", function(event) {
if (event.key.toLowerCase() === "x") {
redirectToLuxodd();
}
});
window.addEventListener("blur", function() {
setTimeout(() => {
window.focus();
}, 100);
});
window.addEventListener("message", function(event) {
if (event.data.type === "keydown") {
console.log("Key pressed in iframe:", event.data.key);
if (event.data.key.toLowerCase() === "x") {
redirectToLuxodd();
}
}
});
// Need to add this inside of iframe js, or doing this in the electron:
// document.addEventListener("keydown", function(event) {
// window.parent.postMessage({ type: "keydown", key: event.key }, "*");
// });
</script>
</body>
</html>