32 lines
1.6 KiB
HTML
32 lines
1.6 KiB
HTML
<!doctype html>
|
|
<html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
|
|
<title>Opening secure service | RanaZe</title><style>body{font:16px system-ui;background:#081324;color:#f8fafc;display:grid;place-items:center;min-height:100vh;margin:0}.card{max-width:34rem;padding:2rem;border:1px solid #33415d;border-radius:8px}a{color:#38bdf8}</style></head>
|
|
<body><main class="card"><strong id="title">Opening secure service...</strong><p id="message">This window will continue automatically.</p><p><a id="continue" hidden>Continue</a></p></main>
|
|
<script>
|
|
(() => {
|
|
const parameters = new URLSearchParams(location.search);
|
|
const key = parameters.get("key") || "";
|
|
const provider = parameters.get("provider") || "external service";
|
|
const allowedKey = /^ranaze_[a-z0-9_]{1,80}$/i.test(key);
|
|
const title = document.getElementById("title");
|
|
const message = document.getElementById("message");
|
|
const link = document.getElementById("continue");
|
|
title.textContent = `Opening ${provider}...`;
|
|
message.textContent = `This window will continue to ${provider} automatically.`;
|
|
const redirect = () => {
|
|
if (!allowedKey) return;
|
|
const url = localStorage.getItem(key);
|
|
if (!url || !url.startsWith("https://")) return;
|
|
link.href = url;
|
|
link.hidden = false;
|
|
link.textContent = `Continue to ${provider}`;
|
|
localStorage.removeItem(key);
|
|
location.replace(url);
|
|
};
|
|
addEventListener("storage", (event) => { if (event.key === key) redirect(); });
|
|
addEventListener("focus", redirect);
|
|
setInterval(redirect, 500);
|
|
redirect();
|
|
})();
|
|
</script></body></html>
|