Firefox / Chrome-style small pill at the bottom-left of the window showing the href when the pointer hovers a link, hidden when the pointer leaves. Fed by webContents.update-target-url on every tab; auto-sizes to its text via an IPC resize channel. Cleared on tab switch so a lingering hover pill from tab A doesn't carry across to tab B. Positioned by layout() so it tracks window resizes. New files link-status.html + link-status-preload.js registered in build.files (GOTCHAS.md rule: missing entries silently omit from the packaged app). Not shipped yet — bundles into the next Theseus release.
22 lines
1,022 B
HTML
22 lines
1,022 B
HTML
<!doctype html>
|
|
<html><head><meta charset="utf-8">
|
|
<style>
|
|
:root { color-scheme: light dark; font-family: system-ui, sans-serif; }
|
|
html, body { margin: 0; background: transparent; overflow: hidden; }
|
|
.pill { background: #1c222c; border: 1px solid #ffffff26; border-top: none; border-left: none;
|
|
border-radius: 0 8px 0 0; box-shadow: 0 -2px 12px #0006;
|
|
color: #b9c2d0; font-size: 11.5px; padding: 4px 10px 4px 8px;
|
|
display: inline-block; max-width: 100%; overflow: hidden;
|
|
text-overflow: ellipsis; white-space: nowrap; direction: ltr; }
|
|
@media (prefers-color-scheme: light) {
|
|
.pill { background: #ffffff; color: #3c4453; border-color: rgba(0,0,0,.15); }
|
|
}
|
|
</style></head>
|
|
<body><span class="pill" id="p"></span>
|
|
<script>
|
|
const p = document.getElementById("p");
|
|
window.linkstatus.onUrl((url) => {
|
|
p.textContent = String(url || "");
|
|
requestAnimationFrame(() => { try { window.linkstatus.resize(p.offsetWidth + 2, p.offsetHeight + 2); } catch (e) {} });
|
|
});
|
|
</script></body></html>
|