Commit 15cfff0bc5163399a5e82ed1ac959e92d5c1fb12
Open dat links in external application
Anders Rune Jensen committed on 4/23/2019, 8:56:26 PMParent: 06b26ae462316f9ae5c6d2f93b73e8158d7bee29
Files changed
app/async/catch-link-click.js | changed |
app/async/catch-link-click.js | |||
---|---|---|---|
@@ -33,9 +33,9 @@ | |||
33 | 33 … | ||
34 | 34 … | var url | |
35 | 35 … | ||
36 | 36 … | try { | |
37 | - var url = new URL(href) | ||
37 … | + url = new URL(href) | ||
38 | 38 … | } catch (e) { | |
39 | 39 … | // In case we pass an invalid URL | |
40 | 40 … | url = {} | |
41 | 41 … | } | |
@@ -44,9 +44,9 @@ | |||
44 | 44 … | altKey: ev.altKey, | |
45 | 45 … | ctrlKey: ev.ctrlKey, | |
46 | 46 … | metaKey: ev.metaKey, | |
47 | 47 … | shiftKey: ev.shiftKey, | |
48 | - isExternal: !!url.host || url.protocol === 'magnet:' | ||
48 … | + isExternal: !!url.host || url.protocol === 'magnet:' || url.protocol === 'dat:' | ||
49 | 49 … | } | |
50 | 50 … | ||
51 | 51 … | cb(href, opts) | |
52 | 52 … | }) |
Built with git-ssb-web