mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-12 20:18:41 -09:00
Handle xterm url opening
This commit is contained in:
parent
9bd410f1e4
commit
4888a9b394
1 changed files with 9 additions and 0 deletions
|
|
@ -199,6 +199,15 @@ module.exports = class Window {
|
|||
}
|
||||
});
|
||||
|
||||
// xterm makes link clickable
|
||||
window.webContents.on('new-window', (event, url) => {
|
||||
const protocol = typeof url === 'string' && parseUrl(url).protocol;
|
||||
if (protocol === 'http:' || protocol === 'https:') {
|
||||
event.preventDefault();
|
||||
shell.openExternal(url);
|
||||
}
|
||||
});
|
||||
|
||||
// expose internals to extension authors
|
||||
window.rpc = rpc;
|
||||
window.sessions = sessions;
|
||||
|
|
|
|||
Loading…
Reference in a new issue