JatinkInnovision commited on
Commit
655ca38
·
verified ·
1 Parent(s): 288358c

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +33 -20
index.html CHANGED
@@ -2,37 +2,50 @@
2
  <html lang="en">
3
  <head>
4
  <meta charset="UTF-8">
5
- <title>Redirecting...</title>
6
  <script>
7
- // --- PASTE YOUR LINK ONLY ONCE BELOW ---
8
  const REDIRECT_URL = "https://ai.studio/apps/2dd7c676-dac3-441d-aa0c-1d6b64b711f7?fullscreenApplet=true";
9
- // ---------------------------------------
10
 
11
- // 1. Immediate Javascript Redirect
12
- window.location.href = REDIRECT_URL;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
  </script>
14
 
15
- <!-- 2. Backup Meta Redirect (runs if JS is disabled) -->
16
- <meta http-equiv="refresh" id="meta-redirect" content="0; url=">
17
- <script>
18
- document.getElementById('meta-redirect').content = "0; url=" + REDIRECT_URL;
19
- </script>
20
-
21
  <style>
22
- body { font-family: sans-serif; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; background: #f9f9f9; }
23
- .box { text-align: center; padding: 20px; border: 1px solid #ddd; border-radius: 8px; background: white; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
24
- a { color: #2563eb; text-decoration: none; font-weight: bold; }
 
 
 
 
 
25
  </style>
26
  </head>
27
  <body>
28
- <div class="box">
29
- <p>Redirecting you to the AI Studio App...</p>
30
- <p>If nothing happens, <a id="fallback-link" href="#">click here</a>.</p>
31
- </div>
32
 
33
  <script>
34
- // Sets the manual link to match the variable above
35
- document.getElementById('fallback-link').href = REDIRECT_URL;
36
  </script>
37
  </body>
38
  </html>
 
2
  <html lang="en">
3
  <head>
4
  <meta charset="UTF-8">
5
+ <title>Opening AI Studio...</title>
6
  <script>
7
+ // --- PASTE YOUR AI STUDIO LINK HERE ---
8
  const REDIRECT_URL = "https://ai.studio/apps/2dd7c676-dac3-441d-aa0c-1d6b64b711f7?fullscreenApplet=true";
9
+ // --------------------------------------
10
 
11
+ function redirect() {
12
+ // This command forces the browser to break out of the HF iframe
13
+ // and open the link in the main window.
14
+ try {
15
+ if (window.top) {
16
+ window.top.location.href = REDIRECT_URL;
17
+ } else {
18
+ window.location.href = REDIRECT_URL;
19
+ }
20
+ } catch (e) {
21
+ // Fallback for strict blockers
22
+ window.location.href = REDIRECT_URL;
23
+ }
24
+ }
25
+
26
+ // Run immediately
27
+ redirect();
28
  </script>
29
 
 
 
 
 
 
 
30
  <style>
31
+ body { font-family: sans-serif; display: flex; flex-direction: column; justify-content: center; align-items: center; height: 100vh; margin: 0; background: #f9f9f9; }
32
+ .btn {
33
+ background: #2563eb; color: white; padding: 15px 30px;
34
+ text-decoration: none; border-radius: 8px; font-weight: bold;
35
+ box-shadow: 0 4px 6px rgba(0,0,0,0.1); transition: background 0.2s;
36
+ }
37
+ .btn:hover { background: #1d4ed8; }
38
+ p { margin-bottom: 20px; color: #555; }
39
  </style>
40
  </head>
41
  <body>
42
+ <p>Opening your App...</p>
43
+ <!-- target="_top" is the secret sauce that fixes the click manual fallback -->
44
+ <a id="manual-link" href="#" target="_top" class="btn">Click here if not redirected</a>
 
45
 
46
  <script>
47
+ // Update the button link to match the variable
48
+ document.getElementById('manual-link').href = REDIRECT_URL;
49
  </script>
50
  </body>
51
  </html>