Skip to content
This repository has been archived by the owner on Jun 20, 2022. It is now read-only.

Commit

Permalink
add file url check
Browse files Browse the repository at this point in the history
  • Loading branch information
moughxyz committed Feb 14, 2017
1 parent ba3178e commit 8ae9b8d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,12 @@ function createWindow () {
});

// handle link clicks (this event is fired instead of
// 'new-window' when target is not set to _blank)
// 'new-window' when target is not set to _blank)
win.webContents.on('will-navigate', function(e, url) {
e.preventDefault();
shell.openExternal(url);
if(!url.includes("file://")) {
e.preventDefault();
shell.openExternal(url);
}
});

// auto updater
Expand Down

0 comments on commit 8ae9b8d

Please sign in to comment.