-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathl-index.html
More file actions
515 lines (458 loc) · 22.5 KB
/
l-index.html
File metadata and controls
515 lines (458 loc) · 22.5 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>EOBots</title>
<script src="https://cdn.tailwindcss.com"></script>
<style>
html,body{scroll-behavior:smooth}
.section{min-height:100vh;display:flex;flex-direction:column;justify-content:center;align-items:center}
.card{border:2px solid red;border-radius:.5rem;padding:1rem;transition:all .3s ease;cursor:pointer;background:rgba(255,0,0,.05)}
.card:hover{background:rgba(255,0,0,.15)}
.expanded{background:rgba(255,0,0,.25)}
</style>
</head>
<body class="bg-black text-white font-sans overflow-x-hidden">
<!-- Navbar -->
<nav class="fixed top-0 left-0 w-full bg-black/80 border-b border-red-600 z-50">
<ul class="flex justify-center flex-wrap gap-4 p-4 text-lg">
<li><a href="#home" class="hover:text-red-500">Home</a></li>
<li><a href="#download" class="hover:text-red-500">Download</a></li>
<li><a href="#howto" class="hover:text-red-500">How To</a></li>
<li><a href="#forum" class="hover:text-red-500">Discord</a></li>
<li><a href="#eor-api" class="hover:text-red-500">EOR DB</a></li>
<li><a href="#eoguides" class="hover:text-red-500">EO Guides</a></li>
</ul>
</nav>
<!-- Home (compact spacing + tag pills) -->
<section id="home" class="section text-center px-6">
<header class="mb-4">
<h1 class="text-4xl font-bold text-red-500 mb-2">Welcome to EOBots</h1>
<p class="text-sm opacity-80">
Bots, tools, and clear setup guides—plus a community that actually helps.
</p>
</header>
<div class="leading-snug max-w-xl mx-auto">
<p class="text-base">
Since Endless Online is flooded with paid botters, we’re leveling the field with
<strong class="font-semibold">free, open-source</strong> alternatives. They might be a little rougher than the
glossy pay-to-win stuff, but they’re yours to inspect, improve, and use—so everyone gets a fair shot.
</p>
<!-- compact, centered tag pills with tight spacing -->
<div class="mt-3 flex flex-wrap justify-center gap-2">
<span class="px-3 py-1 rounded-full border border-red-600/60 bg-white/5 text-xs">
<strong>Free & open-source</strong>: no paywalls
</span>
<span class="px-3 py-1 rounded-full border border-red-600/60 bg-white/5 text-xs">
<strong>Community-driven</strong>: by players, for players
</span>
<span class="px-3 py-1 rounded-full border border-red-600/60 bg-white/5 text-xs">
<strong>Practical over pretty</strong>: effective & auditable
</span>
</div>
</div>
<footer class="mt-4 pt-3 border-t border-red-600/50 text-xs opacity-90 max-w-xl mx-auto">
Explore downloads, learn the setups, and plug into the community.
</footer>
</section>
<!-- Downloads -->
<section id="download" class="section px-6">
<h2 class="text-4xl font-bold text-red-500 mb-10">Downloads</h2>
<div id="downloadsContainer" class="grid grid-cols-1 md:grid-cols-3 gap-6 w-full max-w-6xl"></div>
</section>
<!-- How To -->
<section id="howto" class="section px-6">
<h2 class="text-4xl font-bold text-red-500 mb-10">How To Use</h2>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 w-full max-w-6xl mx-auto">
<!-- Card -->
<div class="card group rounded-2xl border border-white/10 bg-black/40 p-4 shadow-lg hover:shadow-xl transition"
onclick="toggleCard(this)">
<h3 class="text-xl font-bold mb-1">Finding NPC Address</h3>
<p class="text-white/80">Learn how to find NPC addresses.</p>
<div class="card-body hidden mt-4 overflow-hidden rounded-xl">
<div class="aspect-video w-full overflow-hidden rounded-xl">
<iframe class="h-full w-full"
src="https://www.youtube.com/embed/iTLIuEHOfd4?si=ONAaS13zwQDKNSgP"
title="YouTube video player" frameborder="0" allowfullscreen
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
referrerpolicy="strict-origin-when-cross-origin"></iframe>
</div>
</div>
</div>
<!-- Card -->
<div class="card group rounded-2xl border border-white/10 bg-black/40 p-4 shadow-lg hover:shadow-xl transition"
onclick="toggleCard(this)">
<h3 class="text-xl font-bold mb-1">Configuring CaptchaBot</h3>
<p class="text-white/80">Step-by-step setup tutorial.</p>
<div class="card-body hidden mt-4 overflow-hidden rounded-xl">
<div class="aspect-video w-full overflow-hidden rounded-xl">
<iframe class="h-full w-full"
src="https://www.youtube.com/embed/ysz5S6PUM-U"
title="YouTube video player" frameborder="0" allowfullscreen
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
referrerpolicy="strict-origin-when-cross-origin"></iframe>
</div>
</div>
</div>
<!-- Card -->
<div class="card group rounded-2xl border border-white/10 bg-black/40 p-4 shadow-lg hover:shadow-xl transition"
onclick="toggleCard(this)">
<h3 class="text-xl font-bold mb-1">Recording Routes</h3>
<p class="text-white/80">Guide to using the WalkPath Recorder.</p>
<div class="card-body hidden mt-4 overflow-hidden rounded-xl">
<div class="aspect-video w-full overflow-hidden rounded-xl">
<iframe class="h-full w-full"
src="https://www.youtube.com/embed/eIP6LVxiPqw?si=iVTs-2GNDcT5j953"
title="YouTube video player" frameborder="0" allowfullscreen
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
referrerpolicy="strict-origin-when-cross-origin"></iframe>
</div>
</div>
</div>
</div>
</section>
<!-- Forum -->
<section id="forum" class="section px-4">
<h2 class="text-4xl font-bold text-red-500 mb-6">Community Discord</h2>
<p class="mb-4 text-lg text-center max-w-2xl mx-auto">
Talk with other EOBots users, share code, report bugs, and discuss updates below.
</p>
<div class="mx-auto max-w-4xl">
<div class="relative pt-[150%] rounded-xl overflow-hidden shadow-2xl ring-1 ring-red-500/40">
<iframe
src="https://discord.com/widget?id=1400941240404410499&theme=dark"
class="absolute inset-0 h-full w-full border-0"
allowtransparency="true" frameborder="0"
sandbox="allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts"
title="Discord Widget"></iframe>
</div>
<div class="mt-4 text-center">
<a href="https://discord.gg/vuKJTzGt9K" target="_blank" rel="noopener"
class="inline-block rounded-xl bg-[#5865F2] px-5 py-3 font-semibold text-white hover:opacity-90 transition">
Join our Discord
</a>
</div>
</div>
</section>
<!-- EOR Database Search (no horizontal overflow on mobile) -->
<section id="eor-api" class="section px-4 min-h-0 justify-start items-stretch">
<h2 class="text-4xl font-bold text-red-500 mb-4 text-center">EOR Database Search</h2>
<div class="mx-auto w-full max-w-5xl rounded-xl border border-red-500/40 bg-black/30 p-4">
<div class="flex flex-col gap-3 sm:flex-row sm:items-center">
<div class="flex flex-wrap gap-2">
<button data-cat="items" class="eor-tab rounded-md border border-red-500/40 px-3 py-1 text-white">Items</button>
<button data-cat="npcs" class="eor-tab rounded-md border border-red-500/40 px-3 py-1 text-white">NPCs</button>
<button data-cat="spells" class="eor-tab rounded-md border border-red-500/40 px-3 py-1 text-white">Spells</button>
<button data-cat="maps" class="eor-tab rounded-md border border-red-500/40 px-3 py-1 text-white">Maps</button>
<button data-cat="shops" class="eor-tab rounded-md border border-red-500/40 px-3 py-1 text-white">Shops</button>
<button data-cat="classes" class="eor-tab rounded-md border border-red-500/40 px-3 py-1 text-white">Classes</button>
<button data-cat="quests" class="eor-tab rounded-md border border-red-500/40 px-3 py-1 text-white">Quests</button>
</div>
<div class="flex-1"></div>
<label class="flex items-center gap-2 text-sm text-gray-300">
<input id="eor-unk" type="checkbox" class="rounded border-red-500/40 bg-black/70">
show_unk=1
</label>
<div class="relative w-full sm:w-80">
<input id="eor-q" placeholder="Search name or ID…"
class="w-full rounded-md bg-black/70 border border-red-500/40 p-2 text-white pr-10">
<span class="absolute right-2 top-2 text-gray-400">⌕</span>
</div>
</div>
<div class="mt-4 grid gap-4 lg:grid-cols-2">
<div>
<div id="eor-status" class="text-sm text-gray-300 mb-2">Pick a category.</div>
<ul id="eor-list"
class="divide-y divide-red-500/20 rounded-md border border-red-500/30 bg-black/50
max-h-[55vh] overflow-auto"></ul>
<button id="eor-more" class="mt-3 hidden rounded-md border border-red-500/40 px-3 py-1 text-white">Load more</button>
</div>
<div class="rounded-md border border-red-500/30 bg-black/50 p-3">
<div class="flex items-center justify-between gap-2">
<h3 id="eor-detail-title" class="text-xl font-semibold text-white">Details</h3>
<div class="flex gap-2">
<button id="eor-copy-json" class="rounded-md border border-red-500/40 px-2 py-1 text-xs text-white">Copy JSON</button>
<button id="eor-copy-curl" class="rounded-md border border-red-500/40 px-2 py-1 text-xs text-white">Copy curl</button>
</div>
</div>
<div id="eor-images" class="mt-3 flex flex-wrap gap-3 overflow-auto max-w-full"></div>
<pre id="eor-detail"
class="mt-3 max-h-[45vh] overflow-auto overflow-x-auto rounded bg-black/70 p-3 text-green-200 text-sm border border-red-500/20
whitespace-pre-wrap break-words max-w-full">Select a result…</pre>
</div>
</div>
</div>
</section>
<!-- EO Guides (embedded & fits screen) -->
<section id="eoguides" class="section px-4 min-h-0 justify-start items-stretch">
<h2 class="text-4xl font-bold text-red-500 mb-4 text-center">EO Guides</h2>
<div class="mx-auto w-full max-w-6xl rounded-xl border border-red-500/40 bg-black/30 p-4">
<div class="flex flex-col gap-3 sm:flex-row sm:items-center">
<label class="text-sm text-gray-300">
Page
<select id="eog-select" class="w-full mt-1 rounded-md bg-black/70 border border-red-500/40 p-2 text-white">
<option value="https://www.eo-guides.com/">Home</option>
<option value="https://www.eo-guides.com/guides">Guides index</option>
<option value="https://www.eo-guides.com/quests" selected>Quests</option>
<option value="https://www.eo-guides.com/boss-encounters">Boss Encounters</option>
<option value="https://www.eo-guides.com/classes">Classes</option>
<option value="https://www.eo-guides.com/world-map">World Map</option>
<option value="https://www.eo-guides.com/commands">Commands</option>
</select>
</label>
<div class="flex-1"></div>
<a href="https://www.eo-guides.com/" target="_blank" rel="noopener"
class="inline-block rounded-md bg-red-600 px-4 py-2 text-white font-semibold hover:opacity-90">
Open full site
</a>
</div>
<!-- Fit-to-screen iframe (no sandbox so it can render properly) -->
<div id="eog-wrap" class="relative mt-4 rounded-xl overflow-hidden shadow-2xl ring-1 ring-red-500/40 h-[70vh] md:h-[80vh]">
<iframe id="eog-frame"
src="https://www.eo-guides.com/quests"
class="absolute inset-0 w-full h-full border-0"
loading="lazy" allowfullscreen
title="EO Guides"></iframe>
</div>
<!-- Fallback (only shows if blocked) -->
<div id="eog-fallback" class="hidden mt-3 rounded-md border border-red-500/30 bg-black/50 p-3 text-sm text-gray-300">
</div>
</div>
</div>
</section>
<!-- Footer -->
<footer class="text-center py-6 border-t border-red-600 text-sm">
© 2025 EOBots. Built by Cera & Recovery Featured Work By Empire, Trashman, Jetbot, and more.
</footer>
<!-- Scripts -->
<script>
// Toggle cards
function toggleCard(cardEl){
document.querySelectorAll('#howto .card').forEach(c=>{ if(c!==cardEl) collapseCard(c); });
const body=cardEl.querySelector('.card-body'); if(!body)return;
const open=body.classList.contains('hidden');
if(open){ body.classList.remove('hidden'); cardEl.classList.add('expanded'); }
else{ collapseCard(cardEl); }
}
function collapseCard(cardEl){
const body=cardEl.querySelector('.card-body'); if(!body||body.classList.contains('hidden'))return;
const iframe=body.querySelector('iframe'); if(iframe){ const s=iframe.src; iframe.src=s; }
body.classList.add('hidden'); cardEl.classList.remove('expanded');
}
// Downloads loader (keeps your schema)
async function loadDownloads(){
const container=document.getElementById('downloadsContainer');
try{
const res=await fetch('downloads.json',{cache:'no-store'});
if(!res.ok) throw new Error(res.statusText);
const downloads=await res.json();
if(!Array.isArray(downloads)) throw new Error('downloads.json must be an array');
container.innerHTML='';
downloads.forEach(d=>{
const card=document.createElement('div');
card.className='card';
card.innerHTML=`
<h3 class="text-xl font-bold mb-2">${d.title??'Untitled'}</h3>
<p>${d.description??''}</p>
<div class="hidden mt-4 text-sm">
${d.version?`<p><strong>Version:</strong> ${d.version}</p>`:''}
${d.details?`<p>${d.details}</p>`:''}
${d.link?`<a href="${d.link}" target="_blank" class="text-red-400 underline mt-2 inline-block">Download</a>`:''}
</div>`;
card.onclick=()=>toggleCard(card);
container.appendChild(card);
});
}catch{
container.innerHTML='<p class="text-red-400">Error loading downloads.json</p>';
}
}
loadDownloads();
</script>
<!-- EOR Search (robust + NO side overflow) -->
<script>
(() => {
const BASE="https://eor-api.exile-studios.com";
const unk=document.getElementById("eor-unk");
const q=document.getElementById("eor-q");
const status=document.getElementById("eor-status");
const listEl=document.getElementById("eor-list");
const moreBtn=document.getElementById("eor-more");
const detailEl=document.getElementById("eor-detail");
const titleEl=document.getElementById("eor-detail-title");
const imgWrap=document.getElementById("eor-images");
const copyJsonBtn=document.getElementById("eor-copy-json");
const copyCurlBtn=document.getElementById("eor-copy-curl");
const tabs=[...document.querySelectorAll(".eor-tab")];
let current="items";
let cache={};
let filtered=[];
let page=0;
const PAGE_SIZE=100;
const catCfg={
items:{list:"/api/items",detail:id=>`/api/items/${id}`,images:id=>[`/api/items/${id}/graphic`,`/api/items/${id}/graphic/ground`]},
npcs:{list:"/api/npcs",detail:id=>`/api/npcs/${id}`,images:id=>[`/api/npcs/${id}/graphic`]},
spells:{list:"/api/spells",detail:id=>`/api/spells/${id}`,images:id=>[`/api/spells/${id}/icon`,`/api/spells/${id}/graphic`]},
maps:{list:"/api/maps",detail:id=>`/api/maps/${id}`,images:null},
shops:{list:"/api/shops",detail:name=>`/api/shops/${encodeURIComponent(name)}`,images:null},
classes:{list:"/api/classes",detail:id=>`/api/classes/${id}`,images:null},
quests:{list:"/api/quests",detail:id=>`/api/quests/${id}`,images:null},
};
function qs(url){ return unk.checked ? url+(url.includes("?")?"&":"?")+"show_unk=1" : url; }
async function fetchJson(path){
const url=qs(BASE+path);
const r=await fetch(url,{headers:{"Accept":"application/json"}});
if(!r.ok) throw new Error(r.status+" "+r.statusText);
return r.json();
}
function unwrapForList(cat,data){
if(Array.isArray(data)) return data;
if(data && typeof data==="object"){
const keys=[cat,"data","results","list","records","items","npcs","spells","maps","classes","quests","shops"];
for(const k of keys){ if(Array.isArray(data[k])) return data[k]; }
const out=[];
for(const [k,v] of Object.entries(data)){
if(v==null) continue;
if(typeof v==="string"||typeof v==="number"){ out.push({id:k,name:String(v),raw:v}); continue; }
out.push({
id:v.id??v.itemId??v.npcId??v.spellId??v.classId??v.questId??v.mapId??k,
name:v.name??v.displayName??String(k),
raw:v
});
}
return out;
}
return [];
}
function normalizeList(cat,list){
return list.map((rec,idx)=>{
if(typeof rec==="string") return {id:rec,name:rec,raw:rec};
if(typeof rec==="number") return {id:rec,name:String(rec),raw:rec};
const id = rec.id ?? rec.itemId ?? rec.npcId ?? rec.spellId ?? rec.classId ?? rec.questId ?? rec.mapId ?? rec.index ?? (cat==="shops"?rec.name:undefined) ?? idx;
const name = rec.name ?? rec.displayName ?? ("#"+id);
return {id,name,raw:rec};
});
}
async function ensureList(cat){
if(cache[cat]?.list) return;
status.textContent=`Loading ${cat}…`;
try{
const raw=await fetchJson(catCfg[cat].list);
const unwrapped=unwrapForList(cat,raw);
const list=normalizeList(cat,unwrapped);
cache[cat]={raw,list};
status.textContent=`Loaded ${list.length} ${cat}.`;
}catch(e){
status.textContent=`Error loading ${cat}: ${e.message}`;
cache[cat]={raw:[],list:[]};
}
}
function applyFilter(){
const needle=q.value.trim().toLowerCase();
const list=cache[current].list||[];
filtered = needle ? list.filter(r =>
String(r.name).toLowerCase().includes(needle) ||
String(r.id).toLowerCase().includes(needle)
) : list.slice();
page=0; renderPage();
}
function renderPage(){
listEl.innerHTML="";
const start=page*PAGE_SIZE;
const slice=filtered.slice(start,start+PAGE_SIZE);
if(!slice.length){
listEl.innerHTML=`<li class="p-3 text-gray-300">No results.</li>`;
moreBtn.classList.add("hidden"); return;
}
const frag=document.createDocumentFragment();
for(const r of slice){
const li=document.createElement("li");
li.className="p-2 hover:bg-black/40 cursor-pointer";
li.innerHTML=`<div class="flex items-center justify-between gap-2">
<div class="truncate text-white">${escapeHtml(r.name)}</div>
<div class="text-xs text-gray-400">ID: ${escapeHtml(String(r.id))}</div>
</div>`;
li.addEventListener("click",()=>showDetail(r));
frag.appendChild(li);
}
listEl.appendChild(frag);
moreBtn.classList.toggle("hidden", start+PAGE_SIZE>=filtered.length);
}
function escapeHtml(s){ return String(s).replace(/[&<>"]/g,c=>({'&':'&','<':'<','>':'>','"':'"'}[c])); }
async function showDetail(r){
titleEl.textContent=`${capitalize(current)} – ${r.name}`;
detailEl.textContent="Loading details…";
imgWrap.innerHTML="";
try{
const key = (current==="shops") ? r.name : r.id;
const path=catCfg[current].detail(key);
const data=await fetchJson(path);
detailEl.textContent=JSON.stringify(data,null,2);
const imgs = catCfg[current].images ? catCfg[current].images(r.id) : [];
if(imgs && imgs.length){
for(const p of imgs){
const url=qs(BASE+p);
const img=document.createElement("img");
img.src=url; img.alt=current+" image";
img.className="max-h-64 object-contain rounded border border-red-500/30 bg-black/70 p-2";
imgWrap.appendChild(img);
}
}
copyCurlBtn.onclick=()=>copy(`curl "${qs(BASE+path)}"`);
copyJsonBtn.onclick=()=>copy(JSON.stringify(data,null,2));
}catch(e){
detailEl.textContent="Error: "+e.message;
copyCurlBtn.onclick=null; copyJsonBtn.onclick=null;
}
}
function copy(text){
navigator.clipboard.writeText(text).then(()=>{
copyJsonBtn.textContent="Copied"; copyCurlBtn.textContent="Copied";
setTimeout(()=>{copyJsonBtn.textContent="Copy JSON";copyCurlBtn.textContent="Copy curl";},800);
});
}
function capitalize(s){return s.charAt(0).toUpperCase()+s.slice(1);}
function setActive(cat){
current=cat;
tabs.forEach(b=>b.classList.toggle("bg-red-600",b.dataset.cat===cat));
}
async function initCategory(cat){ setActive(cat); await ensureList(cat); applyFilter(); }
tabs.forEach(b=>b.addEventListener("click",()=>initCategory(b.dataset.cat)));
moreBtn.addEventListener("click",()=>{page++;renderPage();});
let t=0; q.addEventListener("input",()=>{clearTimeout(t); t=setTimeout(applyFilter,150);});
unk.addEventListener("change",()=>initCategory(current));
initCategory(current);
})();
</script>
<!-- EO Guides selector + fit + fallback hint -->
<script>
(() => {
const sel=document.getElementById("eog-select");
const frame=document.getElementById("eog-frame");
const wrap=document.getElementById("eog-wrap");
const fallback=document.getElementById("eog-fallback");
const KEY="eog.last";
const last=localStorage.getItem(KEY);
if(last){ sel.value=last; frame.src=last; }
sel.addEventListener("change",()=>{
frame.src=sel.value;
localStorage.setItem(KEY,sel.value);
});
function size(){
if(!wrap) return;
const top=wrap.getBoundingClientRect().top;
const avail=Math.max(420, window.innerHeight - top - 16);
wrap.style.height=avail+"px";
}
window.addEventListener("resize",size);
window.addEventListener("orientationchange",size);
window.addEventListener("load",size);
frame.addEventListener("load",()=>{
try{
if(!frame.contentWindow || frame.src==="about:blank"){ fallback.classList.remove("hidden"); }
}catch{ /* cross-origin */ }
});
})();
</script>
</body>
</html>