-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
293 lines (292 loc) · 13.1 KB
/
index.html
File metadata and controls
293 lines (292 loc) · 13.1 KB
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
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
<!DOCTYPE html>
<html lang="en">
<head>
<!-- TikTok Pixel Code Start -->
<script>
!function (w, d, t) {
w.TiktokAnalyticsObject=t;var ttq=w[t]=w[t]||[];ttq.methods=["page","track","identify","instances","debug","on","off","once","ready","alias","group","enableCookie","disableCookie","holdConsent","revokeConsent","grantConsent"],ttq.setAndDefer=function(t,e){t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}};for(var i=0;i<ttq.methods.length;i++)ttq.setAndDefer(ttq,ttq.methods[i]);ttq.instance=function(t){for(
var e=ttq._i[t]||[],n=0;n<ttq.methods.length;n++)ttq.setAndDefer(e,ttq.methods[n]);return e},ttq.load=function(e,n){var r="https://analytics.tiktok.com/i18n/pixel/events.js",o=n&&n.partner;ttq._i=ttq._i||{},ttq._i[e]=[],ttq._i[e]._u=r,ttq._t=ttq._t||{},ttq._t[e]=+new Date,ttq._o=ttq._o||{},ttq._o[e]=n||{};n=document.createElement("script")
;n.type="text/javascript",n.async=!0,n.src=r+"?sdkid="+e+"&lib="+t;e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(n,e)};
ttq.load('D29K96JC77U9TM7VT9MG');
ttq.page();
}(window, document, 'ttq');
</script>
<!-- TikTok Pixel Code End -->
<meta charset="UTF-8" />
<title>NightClub Simulator VR</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="NightClub Simulator VR" />
<link rel="preload" as="image" href="bg.png" />
<style>
:root {
--fg: #ffffff;
--glow1: rgba(255, 208, 77, 0.95);
--glow2: rgba(255, 104, 174, 0.9);
--accent1: #ffd84d;
--accent2: #ff68ae;
--accent3: #8cebff;
}
* { box-sizing: border-box; }
html, body {
height: 100%;
margin: 0;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-rendering: optimizeLegibility;
}
body {
min-height: 100svh;
background: url('bg.png') no-repeat center center / cover fixed;
display: grid;
place-items: center;
color: var(--fg);
font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
position: relative;
overflow: hidden;
}
.overlay {
position: absolute; inset: 0;
background: radial-gradient(120% 120% at 50% 50%, rgba(0,0,0,0.25), rgba(0,0,0,0.72) 55%, rgba(0,0,0,0.88));
pointer-events: none;
}
main.content {
position: relative; z-index: 1;
text-align: center;
width: min(92vw, 560px);
padding: 6vh 4vw;
animation: fadeUp 700ms ease-out both;
}
h1.title {
margin: 0 0 1rem;
font-size: clamp(1.8rem, 6.2vw, 3rem);
font-weight: 800;
letter-spacing: 0.04em;
line-height: 1.1;
background: linear-gradient(92deg, var(--accent1), var(--accent2) 55%, var(--accent3));
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
text-shadow:
0 0 24px var(--glow2),
0 0 48px rgba(140, 235, 255, 0.35);
filter: drop-shadow(0 8px 28px rgba(0,0,0,0.45));
animation: glowPulse 2400ms ease-in-out infinite;
}
.beta-text {
margin: 0.5rem 0 2rem;
font-size: clamp(1rem, 4.5vw, 1.25rem);
font-weight: 600;
line-height: 1.35;
letter-spacing: 0.02em;
background: linear-gradient(92deg, #fff, #ffe3f3 60%, #e7ffff);
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
text-shadow:
0 0 18px rgba(255,255,255,0.18),
0 0 36px rgba(255,255,255,0.12);
opacity: 0;
animation: fadeIn 900ms 220ms ease-out forwards, shine 2200ms 300ms ease-in-out both;
background-size: 200% auto;
}
.beta-text .free {
position: relative;
font-weight: 950;
letter-spacing: 0.02em;
background: linear-gradient(92deg, var(--accent1), var(--accent2));
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
text-shadow:
0 0 1px #000,
0 0 2px #000,
0 0 3px var(--glow1),
0 0 5px var(--glow2),
0 0 12px var(--glow2),
0 0 22px var(--glow1),
0 0 34px rgba(255, 255, 255, 0.25);
animation:
freePulse 2200ms ease-in-out infinite,
freeFlicker 2600ms ease-in-out infinite;
white-space: nowrap;
display: inline-block;
}
a.discord-btn {
display: inline-block;
padding: 0.95rem 2.2rem;
font-size: clamp(0.95rem, 4.2vw, 1.15rem);
font-weight: 800;
letter-spacing: 0.04em;
color: #fff;
text-decoration: none;
background: linear-gradient(90deg, #5865f2 0%, #3b48c7 100%);
border-radius: 999px;
box-shadow:
0 0 0 rgba(88, 101, 242, 0.0),
0 10px 24px rgba(88, 101, 242, 0.35),
inset 0 0 0 1px rgba(255,255,255,0.08);
transform: translateZ(0);
transition: transform 120ms ease, box-shadow 200ms ease, filter 200ms ease;
will-change: transform, box-shadow, filter;
animation: btnBreath 2600ms ease-in-out infinite;
}
a.discord-btn:hover {
transform: translateY(-2px) scale(1.03);
filter: saturate(1.15);
}
a.discord-btn:active {
transform: translateY(0.5px) scale(0.99);
filter: saturate(1);
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; filter: blur(6px); transform: translateY(6px); } to { opacity: 1; filter: blur(0); transform: translateY(0);} }
@keyframes glowPulse { 0%, 100% { text-shadow: 0 0 24px var(--glow2), 0 0 48px rgba(140,235,255,0.35); } 50% { text-shadow: 0 0 32px rgba(255, 208, 77, 0.9), 0 0 56px rgba(140,235,255,0.55); } }
@keyframes freePulse { 0%, 100% { transform: scale(1); filter: brightness(1); } 50% { transform: scale(1.06); filter: brightness(1.15); } }
@keyframes freeFlicker { 0%, 100% { opacity: 1; } 42% { opacity: 0.95; } 44% { opacity: 0.6; } 46% { opacity: 1; } 72% { opacity: 0.92; } 74% { opacity: 0.65; } 76% { opacity: 1; } }
@keyframes btnBreath { 0%, 100% { box-shadow: 0 0 0 rgba(88, 101, 242, 0.0), 0 10px 24px rgba(88, 101, 242, 0.35), inset 0 0 0 1px rgba(255,255,255,0.08); transform: translateZ(0) scale(1); } 50% { box-shadow: 0 0 24px rgba(88, 101, 242, 0.45), 0 18px 40px rgba(88, 101, 242, 0.55), inset 0 0 0 1px rgba(255,255,255,0.12); transform: translateZ(0) scale(1.03); } }
@keyframes shine { 0% { background-position: -120% 0; } 100% { background-position: 220% 0; } }
#test-panel { position: fixed; left: 10px; bottom: 10px; z-index: 9999; background: rgba(0,0,0,0.72); color: #eaf7ff; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; border: 1px solid rgba(255,255,255,0.12); border-radius: 8px; padding: 10px 12px; max-width: 86vw; font-size: 12px; display: none; white-space: pre-wrap; line-height: 1.35; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
noscript { position: fixed; top: 0; left: 0; right: 0; background: #111; color: #fff; padding: 8px 12px; font-size: 14px; text-align: center; }
</style>
</head>
<body>
<div class="overlay" aria-hidden="true"></div>
<main class="content" role="main">
<h1 class="title" data-testid="title">NightClub Simulator VR</h1>
<p class="beta-text" data-testid="beta">
One of the BEST sandbox games on Quest!<br />
Try the game FOR FREE before you buy!<br />
New multiplayer-mode is now LIVE!<br />
</p>
<a
class="discord-btn"
data-testid="discord"
href="https://vr.meta.me/s/2dIeMkLdW5vxXjB"
target="_blank"
rel="noopener noreferrer"
aria-label="Check it out now!"
>Check It Out Now!</a>
</main>
<noscript>JavaScript is disabled. Visual effects and diagnostics are limited.</noscript>
<script id="page-logic">
(function () {
"use strict";
function isMetaMaskConnectError(msg) {
if (!msg) return false;
const s = String(msg).toLowerCase();
return (s.includes("metamask") && (s.includes("failed to connect") || s.includes("connect") || s.includes("request"))) ||
(s.includes("ethereum") && (s.includes("connect") || s.includes("request")));
}
function handleGlobalError(ev) {
const msg = ev.message || (ev.error && ev.error.message) || "";
if (isMetaMaskConnectError(msg)) {
ev.preventDefault?.();
ev.stopImmediatePropagation?.();
window.__ignoredMetaMaskErrors = (window.__ignoredMetaMaskErrors || 0) + 1;
console.warn("[notice] Ignored MetaMask-related error:", msg);
}
}
function handleRejection(ev) {
const reason = ev.reason && (ev.reason.message || ev.reason.toString()) || "";
if (isMetaMaskConnectError(reason)) {
ev.preventDefault?.();
ev.stopImmediatePropagation?.();
window.__ignoredMetaMaskErrors = (window.__ignoredMetaMaskErrors || 0) + 1;
console.warn("[notice] Ignored MetaMask-related rejection:", reason);
}
}
window.addEventListener("error", handleGlobalError, true);
window.addEventListener("unhandledrejection", handleRejection, true);
const img = new Image();
img.src = "bg.png";
})();
</script>
<script id="tests">
(function (){
"use strict";
const tests = [];
function test(name, fn) { tests.push({name, fn}); }
function assert(cond, msg) { if (!cond) throw new Error(msg || "Assertion failed"); }
const $ = (sel) => document.querySelector(sel);
test("Title exists and text matches", () => {
const el = $('[data-testid="title"]');
assert(!!el, "Title not found");
assert(el.textContent.trim() === "NightClub Simulator VR", "Title text mismatch");
});
test("Beta text contains both lines and FREE markers", () => {
const el = $('[data-testid="beta"]');
assert(!!el, "Beta text not found");
const txt = el.innerText.replace(/\s+/g,' ').trim().toLowerCase();
assert(txt.includes("join the beta test"), "Missing first line");
assert(txt.includes("get ready to win"), "Missing second line");
assert((el.querySelectorAll(".free").length >= 2), "FREE markers not highlighted");
});
test("Discord button configured safely", () => {
const a = $('[data-testid="discord"]');
assert(!!a, "Discord button not found");
assert(a.getAttribute("target") === "_blank", "Discord link should open in new tab");
const rel = (a.getAttribute("rel") || "").toLowerCase();
assert(rel.includes("noopener") && rel.includes("noreferrer"), "Missing noopener/noreferrer");
});
test("Discord URL is correct", () => {
const a = $('[data-testid="discord"]');
assert(!!a, "Discord button not found");
assert(a.getAttribute("href") === "https://vr.meta.me/s/2dIeMkLdW5vxXjB", "Discord invite URL mismatch");
});
test("Background image style applied", () => {
const bg = getComputedStyle(document.body).backgroundImage;
assert(bg && bg !== "none", "Background image CSS not applied");
assert(bg.toLowerCase().includes("bg.png"), "Background should reference bg.png");
});
test("No wallet-connection calls in page logic", () => {
const script = document.getElementById("page-logic").textContent;
const patterns = [
/ethereum\s*\.\s*request\s*\(/i,
/ethereum\s*\.\s*enable\s*\(/i,
/eth_?request?accounts/i
];
const matched = patterns.some(p => p.test(script));
assert(!matched, "Page logic should not attempt to connect to wallets");
});
test("MetaMask 'Failed to connect' error is suppressed", () => {
const evt = new ErrorEvent("error", {
message: "Failed to connect to MetaMask",
cancelable: true,
});
window.dispatchEvent(evt);
assert(evt.defaultPrevented === true, "MetaMask error should be prevented");
assert((window.__ignoredMetaMaskErrors || 0) >= 1, "Suppression counter not increased");
});
test("MetaMask rejection is suppressed", () => {
const ev = new PromiseRejectionEvent("unhandledrejection", {
reason: new Error("Failed to connect to MetaMask"),
cancelable: true
});
window.dispatchEvent(ev);
assert(ev.defaultPrevented === true, "MetaMask rejection should be prevented");
});
const results = [];
let pass = 0, fail = 0;
for (const t of tests) {
try {
t.fn();
results.push(`✅ ${t.name}`);
pass++;
} catch (e) {
results.push(`❌ ${t.name} — ${e.message}`);
fail++;
}
}
const summary = `Tests: ${pass + fail}, Passed: ${pass}, Failed: ${fail}\n` + results.join("\n");
console.log(summary);
if (new URLSearchParams(location.search).get("test") === "1") {
const panel = document.getElementById("test-panel");
panel.style.display = "block";
panel.textContent = summary;
}
})();
</script>
<div id="test-panel" aria-live="polite" aria-atomic="true"></div>
</body>
</html>