mirror of
https://github.com/atom/atom.git
synced 2026-02-15 09:05:58 -05:00
Support atom protocol links when links are handled
This commit is contained in:
@@ -242,8 +242,12 @@ class WindowEventHandler {
|
||||
handleLinkClick (event) {
|
||||
event.preventDefault()
|
||||
const uri = event.currentTarget && event.currentTarget.getAttribute('href')
|
||||
if (uri && (uri[0] !== '#') && /^https?:\/\//.test(uri)) {
|
||||
this.applicationDelegate.openExternal(uri)
|
||||
if (uri && uri[0] !== '#') {
|
||||
if (/^https?:\/\//.test(uri)) {
|
||||
this.applicationDelegate.openExternal(uri)
|
||||
} else if (uri.startsWith('atom://')) {
|
||||
this.atomEnvironment.uriHandlerRegistry.handleURI(uri);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user