Repository navigation
Expand file tree
/
Copy pathinstall.html
More file actions
575 lines (548 loc) · 26.3 KB
/
Copy pathinstall.html
File metadata and controls
575 lines (548 loc) · 26.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Stremio — Unofficial AltStore Source</title>
<meta name="description" content="Sideload Stremio on iPhone, iPad and Apple TV. One-tap source for AltStore and SideStore, auto-updated every 6 hours." />
<meta name="theme-color" content="#0c0b12" />
<link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ctext y='.9em' font-size='90'%3E%F0%9F%8D%BF%3C/text%3E%3C/svg%3E" />
<style>
:root {
--purple: #7055d9;
--purple-hi: #9b83ff;
--bg: #0c0b12;
--panel: #14121e;
--panel-2: #191627;
--line: #262336;
--text: #f0eef8;
--dim: #9b96b0;
--faint: #6c6784;
--good: #3ecf8e;
--radius: 18px;
}
* { box-sizing: border-box; }
/* Clip horizontal on the root so the page never scrolls sideways on
mobile — a wide child (the version table) scrolls inside its own box,
not the page. Kept on <html> (not <body>) so <body> doesn't become a
nested scroll container. */
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
margin: 0;
background: var(--bg);
color: var(--text);
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
line-height: 1.55;
-webkit-font-smoothing: antialiased;
/* cinematic backdrop: two soft purple glows on near-black */
background-image:
radial-gradient(900px 420px at 85% -10%, rgba(112, 85, 217, .22), transparent 60%),
radial-gradient(700px 380px at -10% 30%, rgba(112, 85, 217, .12), transparent 60%);
background-repeat: no-repeat;
}
.wrap { max-width: 980px; margin: 0 auto; padding: 0 20px 64px; }
/* ---------- header ---------- */
header.top {
display: flex; align-items: center; justify-content: space-between;
padding: 22px 0 0;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.01em; }
.brand .dot {
width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
background: linear-gradient(135deg, var(--purple), #4a35a8);
font-size: 18px;
}
.gh {
color: var(--dim); text-decoration: none; font-size: 14px; font-weight: 600;
border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px;
transition: color .15s, border-color .15s;
}
.gh:hover { color: var(--text); border-color: var(--purple); }
/* ---------- hero ---------- */
.hero { padding: 64px 0 40px; max-width: 640px; }
.badge {
display: inline-flex; align-items: center; gap: 7px;
font-size: 12.5px; font-weight: 600; color: var(--purple-hi);
border: 1px solid rgba(112, 85, 217, .45); border-radius: 999px;
padding: 5px 12px; margin-bottom: 18px;
background: rgba(112, 85, 217, .08);
}
.badge .pulse {
width: 7px; height: 7px; border-radius: 50%; background: var(--good);
box-shadow: 0 0 0 0 rgba(62, 207, 142, .6); animation: pulse 2.4s infinite;
}
@keyframes pulse {
0% { box-shadow: 0 0 0 0 rgba(62, 207, 142, .5); }
70% { box-shadow: 0 0 0 8px rgba(62, 207, 142, 0); }
100% { box-shadow: 0 0 0 0 rgba(62, 207, 142, 0); }
}
/* The dot only claims the source is alive once we have checked. If the
automation has stopped, it stops pulsing and changes colour rather than
reassuring people about something that is no longer true. */
.badge .pulse.warn { background: #e8a33d; box-shadow: none; animation: none; }
.badge .pulse.stale { background: #e5484d; box-shadow: none; animation: none; }
.badge.warn { color: #f0b860; border-color: rgba(232, 163, 61, .45);
background: rgba(232, 163, 61, .09); }
.badge.stale { color: #ff8b8f; border-color: rgba(229, 72, 77, .45);
background: rgba(229, 72, 77, .09); }
h1 {
font-size: clamp(34px, 6vw, 52px); line-height: 1.08;
letter-spacing: -.03em; margin: 0 0 16px; font-weight: 800;
}
h1 .tint { color: var(--purple-hi); }
.hero p { color: var(--dim); font-size: 17px; margin: 0; }
/* ---------- platform cards ---------- */
/* minmax(0,1fr) — not plain 1fr. A grid item defaults to min-width:auto,
so the card refuses to shrink below its min-content width (~565px here,
driven by the nowrap source URL) and overflows narrow phones. Chromium
clips it; iOS Safari does not, which is why this only showed on device. */
.grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; margin-top: 34px; }
@media (max-width: 720px) { .grid { grid-template-columns: minmax(0, 1fr); } }
.card {
min-width: 0;
background: linear-gradient(180deg, var(--panel-2), var(--panel));
border: 1px solid var(--line); border-radius: var(--radius);
padding: 24px; display: flex; flex-direction: column; gap: 16px;
}
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.card h2 { font-size: 19px; margin: 0; letter-spacing: -.01em; }
.meta { color: var(--faint); font-size: 12.5px; white-space: nowrap; }
.latest {
display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
padding: 14px 16px; border-radius: 12px;
background: rgba(112, 85, 217, .1); border: 1px solid rgba(112, 85, 217, .3);
}
.latest .v { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.latest .sub { color: var(--dim); font-size: 13px; }
/* "What's new" — real changelog for the newest build */
.notes { border: 1px solid var(--line); border-radius: 12px; background: #0f0d18; }
.notes[hidden] { display: none; }
.notes summary {
cursor: pointer; padding: 11px 14px; font-size: 13.5px; font-weight: 650;
color: var(--dim); list-style: none; user-select: none;
}
.notes summary::-webkit-details-marker { display: none; }
.notes summary::after { content: " ▾"; color: var(--faint); }
.notes[open] summary::after { content: " ▴"; }
.notes summary:hover { color: var(--text); }
.notes-body {
margin: 0; padding: 0 14px 14px; font-size: 13px; line-height: 1.6;
color: var(--dim); white-space: pre-wrap; word-wrap: break-word;
font-family: inherit; max-height: 260px; overflow-y: auto;
}
.urlrow { display: flex; gap: 8px; min-width: 0; }
.url {
flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
font-size: 12px; color: var(--dim);
background: #0f0d18; border: 1px solid var(--line); border-radius: 10px;
padding: 10px 12px; overflow-x: auto; white-space: nowrap;
-webkit-overflow-scrolling: touch;
}
.copy {
flex: 0 0 auto; border: 1px solid var(--line); background: #0f0d18; color: var(--dim);
border-radius: 10px; padding: 0 14px; font-size: 13px; font-weight: 600; cursor: pointer;
transition: all .15s;
}
.copy:hover { color: #fff; border-color: var(--purple); }
.copy.done { background: var(--good); border-color: var(--good); color: #06251733; color: #052e1c; }
.btns { display: flex; gap: 10px; }
.btn {
flex: 1; text-align: center; text-decoration: none; font-weight: 700; font-size: 14.5px;
padding: 13px 10px; border-radius: 12px; color: #fff;
background: linear-gradient(135deg, var(--purple), #5b41c4);
transition: filter .15s, transform .08s;
}
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: translateY(1px); }
.btn.ghost {
background: transparent; color: var(--purple-hi);
border: 1px solid rgba(112, 85, 217, .5);
}
.hint { color: var(--faint); font-size: 12.5px; margin: 0; }
.hint strong { color: var(--dim); }
/* ---------- versions ---------- */
.versions { margin-top: 56px; }
.versions > h2 { font-size: 24px; letter-spacing: -.02em; margin: 0 0 6px; }
.versions > p { color: var(--dim); font-size: 14.5px; margin: 0 0 22px; }
.vgroup { margin-bottom: 26px; }
.vgroup h3 {
font-size: 13px; text-transform: uppercase; letter-spacing: .08em;
color: var(--faint); margin: 0 0 10px; font-weight: 700;
}
table.vt { width: 100%; border-collapse: collapse; font-size: 14px; }
.vt-scroll {
max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch;
border: 1px solid var(--line); border-radius: 14px; background: var(--panel);
}
.vt th {
text-align: left; color: var(--faint); font-size: 11.5px; text-transform: uppercase;
letter-spacing: .07em; font-weight: 700; padding: 12px 16px;
border-bottom: 1px solid var(--line);
}
.vt td { padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.vt tr:last-child td { border-bottom: none; }
.vt .ver { font-weight: 700; }
.chip {
display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .04em;
color: var(--good); border: 1px solid rgba(62, 207, 142, .4); border-radius: 999px;
padding: 1px 8px; margin-left: 8px; vertical-align: 1px;
}
.vt .dim { color: var(--dim); }
/* Rows whose build has a changelog expand to show it. */
.vt tr.has-notes { cursor: pointer; }
.vt tr.has-notes:hover td { background: rgba(112, 85, 217, .07); }
.vt tr.has-notes:focus-visible { outline: 2px solid var(--purple); outline-offset: -2px; }
.chev {
display: inline-block; margin-right: 7px; color: var(--faint);
transition: transform .15s ease, color .15s ease;
}
.vt tr.open .chev { transform: rotate(90deg); color: var(--purple-hi); }
.chev-hint { color: var(--purple-hi); }
tr[hidden] { display: none; }
.notes-row td { padding: 0; background: #0f0d18; white-space: normal; }
.notes-row:hover td { background: #0f0d18; }
.notes-wrap { position: relative; }
/* Only added once we know the text really is clipped, so a short
changelog never gets a fade over nothing. */
.notes-wrap.clipped::after {
content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 30px;
background: linear-gradient(rgba(15, 13, 24, 0), #0f0d18); pointer-events: none;
}
.notes-box {
padding: 12px 16px 16px; font-size: 12.5px; line-height: 1.65;
color: var(--dim); white-space: pre-wrap; word-wrap: break-word;
max-height: 220px; overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.vt a.dl { color: var(--purple-hi); text-decoration: none; font-weight: 600; }
.vt a.dl:hover { text-decoration: underline; }
.sha {
font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px;
color: var(--faint); cursor: pointer; border: none; background: none; padding: 0;
}
.sha:hover { color: var(--purple-hi); }
.sha.done { color: var(--good); }
.loading { color: var(--faint); font-size: 14px; padding: 18px; }
/* ---------- footer ---------- */
footer {
margin-top: 64px; padding-top: 26px; border-top: 1px solid var(--line);
color: var(--faint); font-size: 13px;
}
footer a { color: var(--dim); }
footer a:hover { color: var(--purple-hi); }
/* ---------- mobile ---------- */
@media (max-width: 560px) {
.wrap { padding: 0 16px 56px; }
.card { padding: 20px; }
.hero { padding: 48px 0 32px; }
.hero p { font-size: 16px; }
.latest .v { font-size: 22px; }
/* Title + release count can't share one line on a phone — stack them
so the count never gets clipped off the right edge. */
.card-head { flex-direction: column; align-items: flex-start; gap: 4px; }
/* let the release count wrap instead of forcing the card wider */
.meta { white-space: normal; }
/* Two side-by-side buttons can't shrink below their label width
("Add to AltStore" alone is ~255px), which overflowed the card on
narrow screens. Stack them full-width instead. */
.btns { flex-direction: column; }
.btn { font-size: 15px; padding: 14px 10px; }
/* Fit the table on a phone with no horizontal scrolling at all: drop
the redundant "App" column (named in the cards above) and the
SHA-256 column (a desktop/verification concern — the hashes stay in
the JSON), and tighten the remaining cells. */
.vt th, .vt td { padding: 10px 8px; font-size: 12.5px; }
.vt th:nth-child(2), .vt td:nth-child(2),
.vt th:nth-child(5), .vt td:nth-child(5) { display: none; }
.chip { margin-left: 6px; font-size: 9.5px; padding: 1px 6px; }
}
</style>
</head>
<body>
<div class="wrap">
<header class="top">
<div class="brand"><span class="dot">🍿</span> stremio‑altstore</div>
<a class="gh" href="https://github.com/gorlev/stremio-altstore">GitHub ↗</a>
</header>
<section class="hero">
<span class="badge" id="freshness" title="Checked automatically every 6 hours">
<span class="pulse" id="freshness-dot"></span>
<span id="freshness-text">Auto-updated every 6 hours · unofficial</span>
</span>
<h1>Stremio,<br /><span class="tint">sideloaded.</span></h1>
<p>Movies and series on your iPhone, iPad and Apple TV — no App Store needed.
Add the source below to AltStore, SideStore, Feather or any signing app,
and every new Stremio release lands on your device automatically.</p>
</section>
<div class="grid">
<section class="card" id="card-ios">
<div class="card-head">
<h2>📱 iPhone & iPad</h2>
<span class="meta" id="meta-ios">…</span>
</div>
<div class="latest">
<span class="v" id="latest-ios">—</span>
<span class="sub" id="latest-ios-sub"></span>
</div>
<details class="notes" id="notes-ios" hidden>
<summary>What's new</summary>
<p class="notes-body" id="notes-ios-body"></p>
</details>
<div class="urlrow">
<div class="url" id="url-ios"></div>
<button class="copy" data-copy="url-ios">Copy</button>
</div>
<div class="btns">
<a class="btn" id="alt-ios">Add to AltStore</a>
<a class="btn ghost" id="side-ios">SideStore</a>
</div>
<p class="hint"><strong>Feather, ESign, Scarlet?</strong> Copy the URL above into your app's Sources section.</p>
</section>
<section class="card" id="card-tvos">
<div class="card-head">
<h2>📺 Apple TV</h2>
<span class="meta" id="meta-tvos">…</span>
</div>
<div class="latest">
<span class="v" id="latest-tvos">—</span>
<span class="sub" id="latest-tvos-sub"></span>
</div>
<details class="notes" id="notes-tvos" hidden>
<summary>What's new</summary>
<p class="notes-body" id="notes-tvos-body"></p>
</details>
<div class="urlrow">
<div class="url" id="url-tvos"></div>
<button class="copy" data-copy="url-tvos">Copy</button>
</div>
<div class="btns">
<a class="btn" id="alt-tvos">Add to AltStore</a>
<a class="btn ghost" id="side-tvos">SideStore</a>
</div>
<p class="hint"><strong>On the TV itself?</strong> Type the URL into your signing app manually — copy it here first.</p>
</section>
</div>
<section class="versions">
<h2>Every release, verified</h2>
<p>Loaded live from the source JSON, so this list is never out of date. Each IPA links
straight to Stremio's own CDN. Rows marked <span class="chev-hint">▸</span> have a
changelog — tap to read it. On wider screens every row also shows its SHA‑256
fingerprint, which you can tap to copy.</p>
<div id="version-groups"><div class="loading">Loading versions…</div></div>
</section>
<footer>
<p>Unofficial community project — not affiliated with Stremio or SmartCode OOD.
IPAs are served by Stremio's public CDN (<code>dl.strem.io</code>); this repo only publishes metadata.<br />
Apps signed with a free Apple ID expire after 7 days.
<a href="https://github.com/gorlev/stremio-altstore">Source & issues on GitHub</a>.</p>
</footer>
</div>
<script>
var BASE = "https://gorlev.github.io/stremio-altstore/";
var PLATFORMS = [
{ key: "ios", json: "stremio-ios.json", label: "iOS / iPadOS" },
{ key: "tvos", json: "stremio-tvos.json", label: "Apple TV" }
];
// Older builds still carry the generated placeholder ("Stremio 2.0.4
// (build 19)."), which is not worth showing as release notes.
function isRealNote(text) {
return typeof text === "string" && text.trim() !== "" &&
!/^\s*.+\s+\d+(\.\d+)*\s+\(build\s+\d+\)\.\s*$/.test(text);
}
function relativeTime(ms) {
var mins = Math.round(ms / 60000);
if (mins < 2) return "just now";
if (mins < 60) return mins + " minutes ago";
var hours = Math.round(mins / 60);
if (hours < 24) return hours === 1 ? "an hour ago" : hours + " hours ago";
var days = Math.round(hours / 24);
return days === 1 ? "a day ago" : days + " days ago";
}
// Turn the badge's "alive" dot into something earned rather than decorative:
// ask GitHub when the updater last completed successfully. Read-only, no
// token, and the page degrades to its static text if the call fails or the
// unauthenticated rate limit is reached.
(function showFreshness() {
var RUNS = "https://api.github.com/repos/gorlev/stremio-altstore/actions/workflows/update.yml/runs"
+ "?status=success&per_page=1";
fetch(RUNS, { headers: { Accept: "application/vnd.github+json" } })
.then(function (r) { return r.ok ? r.json() : Promise.reject(r.status); })
.then(function (d) {
var run = d && d.workflow_runs && d.workflow_runs[0];
if (!run || !run.updated_at) return;
var age = Date.now() - new Date(run.updated_at).getTime();
if (!(age >= 0)) return;
var badge = document.getElementById("freshness");
var dot = document.getElementById("freshness-dot");
var text = document.getElementById("freshness-text");
var hours = age / 3600000;
// Runs every 6 hours, so under 12 means at most one missed cycle.
if (hours < 12) {
text.textContent = "Checked " + relativeTime(age) + " · unofficial";
} else if (hours < 48) {
badge.classList.add("warn"); dot.classList.add("warn");
text.textContent = "Last checked " + relativeTime(age) + " · unofficial";
} else {
badge.classList.add("stale"); dot.classList.add("stale");
text.textContent = "Last checked " + relativeTime(age) + " — updates may have stopped";
}
badge.title = "Updater last succeeded " + new Date(run.updated_at).toLocaleString();
})
.catch(function () { /* keep the static text */ });
})();
function fmtMB(bytes) {
return bytes > 0 ? (bytes / 1048576).toFixed(1) + " MB" : "—";
}
function fmtDate(iso) {
if (!iso) return "—";
var d = new Date(iso + "T00:00:00Z");
return isNaN(d) ? iso : d.toLocaleDateString("en-US", { month: "short", day: "numeric", year: "numeric" });
}
function bindCopy(el, getText) {
el.addEventListener("click", function () {
var t = getText();
var done = function () {
el.classList.add("done");
var old = el.dataset.label || el.textContent;
el.dataset.label = old;
el.textContent = el.classList.contains("sha") ? "copied!" : "Copied";
setTimeout(function () { el.textContent = el.dataset.label; el.classList.remove("done"); }, 1500);
};
if (navigator.clipboard && navigator.clipboard.writeText) {
navigator.clipboard.writeText(t).then(done, done);
} else { done(); }
});
}
// Static wiring (works even if the fetch below fails)
PLATFORMS.forEach(function (p) {
var url = BASE + p.json, enc = encodeURIComponent(url);
document.getElementById("url-" + p.key).textContent = url;
document.getElementById("alt-" + p.key).href = "altstore://source?url=" + enc;
document.getElementById("side-" + p.key).href = "sidestore://source?url=" + enc;
});
Array.prototype.forEach.call(document.querySelectorAll(".copy"), function (btn) {
bindCopy(btn, function () { return document.getElementById(btn.dataset.copy).textContent; });
});
// Live data
var groupsEl = document.getElementById("version-groups");
Promise.all(PLATFORMS.map(function (p) {
return fetch(p.json, { cache: "no-cache" }).then(function (r) { return r.json(); })
.then(function (d) { return { plat: p, data: d }; })
.catch(function () { return { plat: p, data: null }; });
})).then(function (results) {
groupsEl.innerHTML = "";
results.forEach(function (res) {
var p = res.plat, d = res.data;
if (!d) {
document.getElementById("meta-" + p.key).textContent = "";
return;
}
var apps = d.apps || [];
var all = [];
apps.forEach(function (a) {
(a.versions || []).forEach(function (v) { all.push({ app: a, v: v }); });
});
// newest first across apps
all.sort(function (x, y) {
var pk = function (e) {
return (e.v.version || "").split(".").map(function (n) { return +n || 0; })
.concat([+(e.v.buildVersion || 0)]);
};
var a = pk(x), b = pk(y);
for (var i = 0; i < Math.max(a.length, b.length); i++) {
if ((b[i] || 0) !== (a[i] || 0)) return (b[i] || 0) - (a[i] || 0);
}
return 0;
});
// hero card: latest + meta
if (all.length) {
var top = all[0];
document.getElementById("latest-" + p.key).textContent = "v" + top.v.version;
document.getElementById("latest-" + p.key + "-sub").textContent =
"build " + top.v.buildVersion + " · " + fmtDate(top.v.date) + " · " + fmtMB(top.v.size);
document.getElementById("meta-" + p.key).textContent =
all.length + " releases · updated " + fmtDate(top.v.date);
// Real changelog, when we managed to capture one for this build.
var notes = top.v.localizedDescription;
if (isRealNote(notes)) {
// textContent, never innerHTML: this is upstream-authored text.
document.getElementById("notes-" + p.key + "-body").textContent = notes;
document.getElementById("notes-" + p.key).hidden = false;
}
}
// versions table
var g = document.createElement("div");
g.className = "vgroup";
g.innerHTML = "<h3>" + p.label + "</h3>";
var scroll = document.createElement("div");
scroll.className = "vt-scroll";
var t = document.createElement("table");
t.className = "vt";
t.innerHTML = "<thead><tr><th>Version</th><th>App</th><th>Date</th><th>Size</th><th>SHA-256</th><th></th></tr></thead>";
var tb = document.createElement("tbody");
all.forEach(function (e, i) {
var tr = document.createElement("tr");
var sha = e.v.sha256 || "";
var notes = isRealNote(e.v.localizedDescription) ? e.v.localizedDescription : null;
tr.innerHTML =
"<td class='ver'>" + (notes ? "<span class='chev'>▸</span>" : "") +
"v" + e.v.version + " <span class='dim'>b" + e.v.buildVersion + "</span>" +
(i === 0 ? "<span class='chip'>LATEST</span>" : "") + "</td>" +
"<td class='dim'>" + (e.app.name || "") + "</td>" +
"<td class='dim'>" + fmtDate(e.v.date) + "</td>" +
"<td class='dim'>" + fmtMB(e.v.size) + "</td>" +
"<td>" + (sha ? "<button class='sha' title='Copy full hash'>" + sha.slice(0, 10) + "…</button>" : "<span class='dim'>—</span>") + "</td>" +
"<td><a class='dl' href='" + e.v.downloadURL + "'>IPA ↓</a></td>";
if (sha) bindCopy(tr.querySelector(".sha"), function () { return sha; });
tb.appendChild(tr);
// Older builds carry a changelog too; hang it off the row rather
// than adding a column, which the phone layout has no room for.
if (notes) {
tr.classList.add("has-notes");
tr.tabIndex = 0;
tr.setAttribute("role", "button");
tr.setAttribute("aria-expanded", "false");
var detail = document.createElement("tr");
detail.className = "notes-row";
detail.hidden = true;
var cell = document.createElement("td");
cell.colSpan = 6;
var wrap = document.createElement("div");
wrap.className = "notes-wrap";
var box = document.createElement("div");
box.className = "notes-box";
// textContent, never innerHTML: upstream-authored text.
box.textContent = notes;
wrap.appendChild(box);
cell.appendChild(wrap);
detail.appendChild(cell);
tb.appendChild(detail);
var toggle = function (ev) {
// Let the hash button and the download link do their own job.
if (ev && ev.target && ev.target.closest && ev.target.closest("a, button")) return;
var opening = detail.hidden;
detail.hidden = !opening;
tr.classList.toggle("open", opening);
tr.setAttribute("aria-expanded", opening ? "true" : "false");
// Measurable only once it is laid out, so decide on first open.
if (opening) {
wrap.classList.toggle("clipped", box.scrollHeight > box.clientHeight + 1);
}
};
tr.addEventListener("click", toggle);
tr.addEventListener("keydown", function (ev) {
if (ev.key === "Enter" || ev.key === " ") { ev.preventDefault(); toggle(ev); }
});
}
});
t.appendChild(tb);
scroll.appendChild(t);
g.appendChild(scroll);
groupsEl.appendChild(g);
});
if (!groupsEl.children.length) {
groupsEl.innerHTML = "<div class='loading'>Couldn't load version data — view the JSON files on GitHub instead.</div>";
}
});
</script>
</body>
</html>