Commit 305ee7215bd7c6886901aa12488342f4a7c91193
open http links in external app (probably web browser)
Dominic Tarr committed on 5/25/2016, 1:22:41 AMParent: 15c8b380dff5fefb550257e46b87876bda2db1e4
Files changed
modules/tabs.js | changed |
modules/tabs.js | ||
---|---|---|
@@ -28,13 +28,18 @@ | ||
28 | 28 | var link = ancestor(ev.target) |
29 | 29 | if(!link) return |
30 | 30 | var path = link.hash.substring(1) |
31 | 31 | |
32 | + console.log(link) | |
33 | + | |
32 | 34 | ev.preventDefault() |
33 | 35 | ev.stopPropagation() |
34 | 36 | |
37 | + if(!path) | |
38 | + return require('shell').openExternal(link.href) | |
39 | + | |
35 | 40 | if(tabs.has(path)) return tabs.select(path) |
36 | - | |
41 | + | |
37 | 42 | var el = screen(path) |
38 | 43 | if(el) tabs.add(path, el, !ev.ctrlKey) |
39 | 44 | |
40 | 45 | } |
Built with git-ssb-web