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