Added http and https handler for will-navigate event (#1451)

Prevented navigation when a user drops content from a browser into a terminal. Instead, enter in the URL of the content the user dropped.
This commit is contained in:
Graham Kennery 2017-01-25 20:24:01 -05:00 committed by Matheus Fernandes
parent 34419b5edf
commit df0a3c60ed

View file

@ -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});
}
});