MF-SAE / loader.html
user1378916's picture
Use same-origin loader page to avoid popup-blocker edge cases
d718427 verified
Raw History Blame Contribute Delete
776 Bytes
<!doctype html>
<html><head><meta charset="utf-8"><title>Loading dashboard…</title>
<style>body{font:14px system-ui, sans-serif;margin:20px;color:#12151a}</style>
</head>
<body>
<p id="msg">Loading dashboard&hellip;</p>
<script>
const src = new URLSearchParams(location.search).get('src');
if (!src) {
document.getElementById('msg').textContent = 'No dashboard specified.';
} else {
fetch(src).then(r => { if (!r.ok) throw new Error('HTTP ' + r.status); return r.text(); })
.then(html => {
const blob = new Blob([html], { type: 'text/html' });
location.replace(URL.createObjectURL(blob));
})
.catch(e => { document.getElementById('msg').textContent = 'Failed to load dashboard: ' + e.message; });
}
</script>
</body></html>