1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-12-14 10:41:52 +00:00

Fix external link handling

This commit is contained in:
Даниїл Григор'єв 2024-06-20 19:46:26 +03:00
parent a7ec1e53bf
commit 1e24b11834
No known key found for this signature in database
GPG Key ID: B890DF16341D8C1D
2 changed files with 2 additions and 2 deletions

View File

@ -149,7 +149,7 @@ function createWindow() {
//// END SECURITY //// END SECURITY
win.webContents.on("new-window", (event, pth) => { win.webContents.on("will-navigate", (event, pth) => {
event.preventDefault(); event.preventDefault();
if (pth.startsWith("https://")) { if (pth.startsWith("https://")) {

View File

@ -36,7 +36,7 @@ export class PlatformWrapperImplElectron {
*/ */
openExternalLink(url) { openExternalLink(url) {
logger.log(this, "Opening external:", url); logger.log(this, "Opening external:", url);
window.open(url, "about:blank"); location.replace(url);
} }
/** /**