Tray: Fix Nav

This commit is contained in:
thororen1234 2026-02-01 02:08:33 -05:00
parent 8b45943403
commit 8f79232d2b
No known key found for this signature in database
2 changed files with 10 additions and 8 deletions

View file

@ -183,12 +183,4 @@
}
walk(document.body);
document.addEventListener("click", (e) => {
const a = e.target.closest("a[href]");
if (!a) return;
e.preventDefault();
window.open(a.href);
});
</script>

View file

@ -71,6 +71,16 @@ function openAboutWindow() {
width
});
aboutWindow.webContents.setWindowOpenHandler(({ url }) => {
shell.openExternal(url);
return { action: "deny" };
});
aboutWindow.webContents.on("will-navigate", (e, url) => {
e.preventDefault();
shell.openExternal(url);
});
const aboutParams = aboutHtml
.replaceAll("{{VERSION}}", VERSION)
.replaceAll("{{GIT_HASH}}", gitHashShort);