CI / lint (push) Failing after 10s
CI / test (push) Has been skipped
CI / build (push) Has been skipped
CI / e2e (push) Has been skipped
CI / security (push) Successful in 23s
Desktop Build / build-windows (push) Has been cancelled
Desktop Build / build-linux (push) Has been cancelled
70 lines
2.4 KiB
HTML
70 lines
2.4 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head><meta charset="UTF-8"><title>Excalidraw Diagnostic</title>
|
|
<style>
|
|
body { font-family: monospace; background:#1e1e1e; color:#ddd; padding:20px; }
|
|
.pass { color:#4caf50; } .fail { color:#f44336; } .info { color:#ff9800; }
|
|
pre { background:#2d2d2d; padding:10px; border-radius:4px; overflow-x:auto; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<h2>Excalidraw Diagnostic</h2>
|
|
<pre id="log"></pre>
|
|
|
|
<script type="module">
|
|
const log = document.getElementById('log');
|
|
function add(msg, cls='') {
|
|
log.innerHTML += `<span class="${cls}">${msg}</span>\n`;
|
|
}
|
|
|
|
add('--- Step 1: Testing esm.sh connectivity ---');
|
|
try {
|
|
const res = await fetch('https://esm.sh/[email protected]', { method: 'HEAD' });
|
|
add(`✓ esm.sh reachable (HTTP ${res.status})`, 'pass');
|
|
} catch(e) {
|
|
add(`✗ esm.sh unreachable: ${e.message}`, 'fail');
|
|
}
|
|
|
|
add('\n--- Step 2: Importing React ---');
|
|
try {
|
|
const React = await import('https://esm.sh/[email protected]');
|
|
add(`✓ React imported (keys: ${Object.keys(React.default||React).slice(0,5).join(',')})`, 'pass');
|
|
window.React = React;
|
|
} catch(e) {
|
|
add(`✗ React import failed: ${e.message}`, 'fail');
|
|
}
|
|
|
|
add('\n--- Step 3: Importing ReactDOM ---');
|
|
try {
|
|
const ReactDOM = await import('https://esm.sh/[email protected]');
|
|
add(`✓ ReactDOM imported`, 'pass');
|
|
window.ReactDOM = ReactDOM;
|
|
} catch(e) {
|
|
add(`✗ ReactDOM import failed: ${e.message}`, 'fail');
|
|
}
|
|
|
|
add('\n--- Step 4: Importing Excalidraw ---');
|
|
try {
|
|
window.EXCALIDRAW_ASSET_PATH = 'https://esm.sh/@excalidraw/[email protected]/dist/prod/';
|
|
const ExcalidrawLib = await import('https://esm.sh/@excalidraw/[email protected]');
|
|
add(`✓ Excalidraw imported (keys: ${Object.keys(ExcalidrawLib).slice(0,8).join(',')})`, 'pass');
|
|
window.ExcalidrawLib = ExcalidrawLib;
|
|
} catch(e) {
|
|
add(`✗ Excalidraw import failed: ${e.message}`, 'fail');
|
|
}
|
|
|
|
add('\n--- Step 5: CSP Check ---');
|
|
add('Check browser console (F12) for CSP violation messages', 'info');
|
|
add('Look for: "Refused to load the script..." or "violates the following CSP directive..."', 'info');
|
|
|
|
add('\n--- Step 6: Browser Info ---');
|
|
add(`User-Agent: ${navigator.userAgent}`, 'info');
|
|
add(`ES Modules: ${typeof import.meta !== 'undefined' ? 'supported' : 'NOT supported'}`, 'info');
|
|
|
|
add('\n=== Diagnostic complete ===');
|
|
add('If all ✓ above: Excalidraw should work. Check F12 console for errors.', 'info');
|
|
add('If any ✗: That\'s the problem. Share the error message.', 'info');
|
|
</script>
|
|
</body>
|
|
</html>
|