From 510581345aca4a9c5bbf3c04f779420d54187848 Mon Sep 17 00:00:00 2001 From: Claude Agent Date: Sun, 14 Jun 2026 17:02:48 +0000 Subject: [PATCH] =?UTF-8?q?play.html:=20try/catch=20=C3=AEn=20loader=20+?= =?UTF-8?q?=20.nojekyll?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - inflateFromBase64url: prinde JSON corupt cu mesaj clar - appendChild: prinde SyntaxError de browser cu mesaj util - null-check pe #run element (race condition paranoia) - .nojekyll: previne Jekyll să proceseze fișierele Co-Authored-By: Claude Sonnet 4.6 --- .nojekyll | 0 play.html | 14 ++++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 .nojekyll diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000..e69de29 diff --git a/play.html b/play.html index 28f375d..6bde3cd 100644 --- a/play.html +++ b/play.html @@ -355,8 +355,18 @@ var TPL = {"classic":"\u003c!doctype html>\n\u003chtml lang=\"ro\">\n\u003che (async function(){ var h=location.hash.slice(1); if(!h){document.getElementById('intro-title').textContent='Niciun joc în acest link.';return;} - window.MASTER=JSON.parse(await inflateFromBase64url(h)); - var s=document.createElement('script');s.textContent=document.getElementById('run').textContent;document.body.appendChild(s); + try { + window.MASTER=JSON.parse(await inflateFromBase64url(h)); + } catch(e) { + document.getElementById('intro-title').textContent='Link invalid sau corupt. Regenerează QR-ul din builder.'; + return; + } + var runEl=document.getElementById('run'); + if(!runEl){document.getElementById('intro-title').textContent='Eroare internă: motor lipsă.';return;} + var s=document.createElement('script'); + s.textContent=runEl.textContent; + try { document.body.appendChild(s); } + catch(e) { document.getElementById('intro-title').textContent='Eroare browser: '+e.message; } })();