bump rev 4.0.5

This commit is contained in:
Stewart Allen 2024-07-10 18:57:24 -04:00
commit 8288addcd0
4 changed files with 12 additions and 3 deletions

View file

@ -43,11 +43,20 @@ function createWindow() {
mainWindow.loadURL('http://localhost:5309/kiri');
// default normal url navigation or page opens to happen outside Electron
mainWindow.webContents.setWindowOpenHandler((details) => {
// console.log('EXTERNAL');
shell.openExternal(details.url);
return { action: 'deny' }
});
// prevent "other" urls from opening inside Electron (alerts are problematic)
mainWindow.webContents.on('will-navigate', (event, url) => {
// console.log('DIVERT');
event.preventDefault();
shell.openExternal(url);
});
if (devel) {
console.log("opening developer tools");
mainWindow.webContents.openDevTools();