From df0a3c60ed755006a1bacbf571b2f1274ca6deaf Mon Sep 17 00:00:00 2001 From: Graham Kennery Date: Wed, 25 Jan 2017 20:24:01 -0500 Subject: [PATCH] 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. --- app/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/index.js b/app/index.js index 2e53f3d1..c5122b32 100644 --- a/app/index.js +++ b/app/index.js @@ -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}); } });