Skip to content

Commit

Permalink
Added http and https handler for will-navigate event (#1451)
Browse files Browse the repository at this point in the history
Prevented navigation when a user drops content from a browser into a terminal. Instead, enter in the URL of the content the user dropped.
  • Loading branch information
grahamkennery authored and matheuss committed Jan 26, 2017
1 parent 34419b5 commit df0a3c6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,9 @@ app.on('ready', () => installDevExtensions(isDev).then(() => {
event.preventDefault();
const path = fileUriToPath(url).replace(/ /g, '\\ ');
rpc.emit('session data send', {data: path});
} else if (protocol === 'http:' || protocol === 'https:') {
event.preventDefault();
rpc.emit('session data send', {data: url});
}
});

Expand Down

0 comments on commit df0a3c6

Please sign in to comment.