mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Register Atom to handle atom:// scheme URLs.
This commit is contained in:
@@ -7,6 +7,7 @@ fs = require 'fs'
|
||||
path = require 'path'
|
||||
optimist = require 'optimist'
|
||||
nslog = require 'nslog'
|
||||
dialog = require 'dialog'
|
||||
_ = require 'underscore'
|
||||
|
||||
console.log = (args...) ->
|
||||
@@ -21,6 +22,13 @@ delegate.browserMainParts.preMainMessageLoopRun = ->
|
||||
event.preventDefault()
|
||||
args.pathsToOpen.push(filePath)
|
||||
|
||||
app.on 'open-url', (event, url) =>
|
||||
event.preventDefault()
|
||||
dialog.showMessageBox
|
||||
message: 'Atom opened with URL'
|
||||
detail: url
|
||||
buttons: ['OK']
|
||||
|
||||
app.on 'open-file', addPathToOpen
|
||||
|
||||
app.on 'will-finish-launching', ->
|
||||
|
||||
Reference in New Issue
Block a user