mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-16 13:48:41 -09:00
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:
parent
34419b5edf
commit
df0a3c60ed
1 changed files with 3 additions and 0 deletions
|
|
@ -313,6 +313,9 @@ app.on('ready', () => installDevExtensions(isDev).then(() => {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
const path = fileUriToPath(url).replace(/ /g, '\\ ');
|
const path = fileUriToPath(url).replace(/ /g, '\\ ');
|
||||||
rpc.emit('session data send', {data: path});
|
rpc.emit('session data send', {data: path});
|
||||||
|
} else if (protocol === 'http:' || protocol === 'https:') {
|
||||||
|
event.preventDefault();
|
||||||
|
rpc.emit('session data send', {data: url});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue