Files
vibemake/cad.html
T

33 lines
1.1 KiB
HTML

<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
<title>VibeMake CAD</title>
<style>
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
#cad-frame { position: fixed; inset: 0; display: block; width: 100vw; height: 100vh; height: 100dvh; border: 0; }
</style>
</head>
<body>
<iframe
id="cad-frame"
src="https://cadworld-studio.robotquan.com/cad"
title="VibeMake CAD"
allow="clipboard-read; clipboard-write; fullscreen"
allowfullscreen
referrerpolicy="strict-origin-when-cross-origin"></iframe>
<script>
const cadFrame = document.getElementById('cad-frame');
const cadOrigin = new URL(cadFrame.src, document.baseURI).origin;
window.addEventListener('message', (event) => {
if (event.source !== cadFrame.contentWindow
|| event.origin !== cadOrigin
|| event.data?.type !== 'vibemake:navigate-home') return;
window.location.assign('/');
});
</script>
</body>
</html>