Spaces:
Running
Running
Update index.html
Browse files- index.html +33 -20
index.html
CHANGED
|
@@ -2,37 +2,50 @@
|
|
| 2 |
<html lang="en">
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
-
<title>
|
| 6 |
<script>
|
| 7 |
-
// --- PASTE YOUR
|
| 8 |
const REDIRECT_URL = "https://ai.studio/apps/2dd7c676-dac3-441d-aa0c-1d6b64b711f7?fullscreenApplet=true";
|
| 9 |
-
// --------------------------------------
|
| 10 |
|
| 11 |
-
|
| 12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
-
.
|
| 24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
</style>
|
| 26 |
</head>
|
| 27 |
<body>
|
| 28 |
-
<
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
</div>
|
| 32 |
|
| 33 |
<script>
|
| 34 |
-
//
|
| 35 |
-
document.getElementById('
|
| 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>
|