mirror of https://github.com/keeweb/keeweb
disabled navigation in desktop
parent
6d781a6358
commit
3a042f25c2
|
@ -109,6 +109,12 @@ app.on('web-contents-created', (event, contents) => {
|
|||
e.preventDefault();
|
||||
emitRemoteEvent('log', { message: `Prevented new window: ${url}` });
|
||||
});
|
||||
contents.on('will-navigate', (e, url) => {
|
||||
if (!url.startsWith('https://beta.keeweb.info/') && !url.startsWith(htmlPath)) {
|
||||
e.preventDefault();
|
||||
emitRemoteEvent('log', { message: `Prevented navigation: ${url}` });
|
||||
}
|
||||
});
|
||||
});
|
||||
app.restartApp = function() {
|
||||
restartPending = true;
|
||||
|
@ -239,12 +245,6 @@ function createMainWindow() {
|
|||
mainWindow.on('session-end', () => {
|
||||
emitRemoteEvent('os-lock');
|
||||
});
|
||||
mainWindow.webContents.on('will-navigate', (e, url) => {
|
||||
if (!url.startsWith('https://beta.keeweb.info/') && !url.startsWith(htmlPath)) {
|
||||
e.preventDefault();
|
||||
emitRemoteEvent('log', { message: `Prevented navigation: ${url}` });
|
||||
}
|
||||
});
|
||||
perfTimestamps &&
|
||||
perfTimestamps.push({ name: 'configuring main window', ts: process.hrtime() });
|
||||
|
||||
|
|
Loading…
Reference in New Issue