File tree 2 files changed +5
-1
lines changed
2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ const {Cc, Ci} = require('chrome')
5
5
const prefs = require ( 'sdk/simple-prefs' ) . prefs
6
6
const ioservice = Cc [ '@mozilla.org/network/io-service;1' ] . getService ( Ci . nsIIOService )
7
7
8
+ // TODO: replace regex with 3rd party library provided by IPFS community
9
+ // Ref. https://github.com/ipfs/notes/issues/92#issuecomment-172135885
8
10
const IPFS_RESOURCE = / ^ h t t p s ? : \/ \/ [ ^ \/ ] + \/ i p ( f | n ) s \/ /
9
11
10
12
exports . IPFS_RESOURCE = IPFS_RESOURCE
Original file line number Diff line number Diff line change @@ -10,7 +10,9 @@ const IPNS_SCHEME = 'ipns'
10
10
const FS_SCHEME = 'fs'
11
11
const WEB_SCHEME_PREFIX = 'web+' // https://github.com/lidel/ipfs-firefox-addon/issues/36
12
12
13
- const IPFS_PATH = new RegExp ( '^/ip(f|n)s/' )
13
+ // TODO: replace regex with 3rd party library provided by IPFS community
14
+ // Ref. https://github.com/ipfs/notes/issues/92#issuecomment-172135885
15
+ const IPFS_PATH = new RegExp ( '^/(ipns/|ipfs/Qm[1-9A-HJ-NP-Za-km-z]{44})' )
14
16
15
17
function CommonProtocolHandler ( ) { }
16
18
You can’t perform that action at this time.
0 commit comments