Files
Xtranslate/test/fixtures/popup.html
T
2026-10-02 01:25:19 -04:00

30 lines
910 B
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!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>