Chromium 86 safelisted some distributed web schemes for registerProtocolHandler() [0][1]. Among them are also `ipfs` and `ipns`. As my first contribution to go-ipfs I grabbed the corresponding issue and added support for the gateway code [2], which will be released with go-ipfs 0.8.0. This means anyone will be able to call e.g.
navigator.registerProtocolHandler('ipfs', 'https://dweb.link/ipfs/?uri=%s', 'ipfs resolver')
Afterwards opening something like:
ipfs://QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR
will be redirected to the public gateway configured above and handled accordingly.
You can also configure a different gateway as some have voiced their concern about routing everything through dweb.link.
[0] https://blog.chromium.org/2020/09/chrome-86-improved-focus-h... [1] https://developer.mozilla.org/en-US/docs/Web/API/Navigator/r... [2] https://github.com/ipfs/go-ipfs/pull/7802