Commit 18d5d5c12c41651882d96e8d597c169e95dc4e73
open links to blobs in default browser
Matt McKegg committed on 2/19/2017, 6:21:07 AMParent: 971116f7265467d698bd470e648c81292c00a108
Files changed
main-window.js | changed |
main-window.js | ||
---|---|---|
@@ -22,9 +22,10 @@ | ||
22 | 22 | ) |
23 | 23 | |
24 | 24 | var api = entry(sockets, nest({ |
25 | 25 | 'page.html.render': 'first', |
26 | - 'keys.sync.id': 'first' | |
26 | + 'keys.sync.id': 'first', | |
27 | + 'blob.sync.url': 'first' | |
27 | 28 | })) |
28 | 29 | |
29 | 30 | var renderPage = api.page.html.render |
30 | 31 | var id = api.keys.sync.id() |
@@ -134,8 +135,10 @@ | ||
134 | 135 | if (href) { |
135 | 136 | var url = Url.parse(href) |
136 | 137 | if (url.host) { |
137 | 138 | electron.shell.openExternal(href) |
139 | + } else if (href.charAt(0) === '&') { | |
140 | + electron.shell.openExternal(api.blob.sync.url(href)) | |
138 | 141 | } else if (href !== '#') { |
139 | 142 | setView(href) |
140 | 143 | } |
141 | 144 | } |
Built with git-ssb-web