Tray: Fix Nav
This commit is contained in:
parent
8b45943403
commit
8f79232d2b
2 changed files with 10 additions and 8 deletions
|
|
@ -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>
|
||||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue