1.18更新

This commit is contained in:
RT15548
2026-01-18 20:04:43 +08:00
committed by GitHub
parent be142640c0
commit 03ba508a31
62 changed files with 18838 additions and 7264 deletions

View File

@@ -358,8 +358,11 @@
</div>
<script type="module">
const PARENT_ORIGIN = (() => {
try { return new URL(document.referrer).origin; } catch { return window.location.origin; }
})();
const post = (payload) => {
try { parent.postMessage({ source: 'LittleWhiteBox-DebugFrame', ...payload }, '*'); } catch {}
try { parent.postMessage({ source: 'LittleWhiteBox-DebugFrame', ...payload }, PARENT_ORIGIN); } catch {}
};
// ═══════════════════════════════════════════════════════════════════════
@@ -738,6 +741,7 @@
// ═══════════════════════════════════════════════════════════════════════
window.addEventListener('message', (event) => {
if (event.origin !== PARENT_ORIGIN || event.source !== parent) return;
const msg = event?.data;
if (!msg || msg.source !== 'LittleWhiteBox-DebugHost') return;
@@ -762,4 +766,4 @@
post({ type: 'FRAME_READY' });
</script>
</body>
</html>
</html>