30 lines
910 B
HTML
30 lines
910 B
HTML
<!doctype html>
|
||
<html>
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; style-src 'unsafe-inline'; script-src 'unsafe-inline'">
|
||
<title>Xtranslate</title>
|
||
<style>
|
||
html, body { margin: 0; height: 100%; background: transparent; }
|
||
body { font: 14px/1.4 sans-serif; color: #f5f5f5; }
|
||
main { margin: 8px; padding: 12px 14px; border-radius: 12px; background: #1f1f1f; }
|
||
#status { color: #9ad; font-size: 12px; }
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<main>
|
||
<div id="status">后端浮窗(fixture)</div>
|
||
</main>
|
||
<script>
|
||
const status = document.getElementById('status');
|
||
if (window.xt) {
|
||
window.xt.onShow((payload) => {
|
||
status.textContent = '已呼出 ' + payload.engine + ' / ' + payload.direction;
|
||
});
|
||
} else {
|
||
status.textContent = 'preload 没有挂上 window.xt';
|
||
}
|
||
</script>
|
||
</body>
|
||
</html>
|