mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Merge pull request #16940 from BoykoAlex/atom-links
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