SSB Custom protocol handler for Firefox
Hey #scuttlebutt,
I am advancing on my quest to make #firefox a nice browser for our platform. Today I built the first proof-of-concept of a custom protocol handler for scuttlebutt messages. The handler is able to load messages from their IDs if used with a protocol such as ext+ssb:<msg id>
, unfortunately, due to the way the API for custom protocols is designed, I couldn't make it understand just ssb:
, I had to add the ext+
to the URL since it loads from an extension.
Basically, it picks the message id from the URL and sends a call using the Native Messaging API to a native app that runs sbot.get()
with the message id and if it is a post type, then it process it further with ssb-markdown
before sending it back to the extension to render in the active tab.
You can see it running on this Vimeo video and there is also a screenshot below:
I need to add some more error checking to it and then I will upload it to github. Stay tuned to this message!
Todos & Roadmap
- Add error checking
- Load a user profile if passed a user id
- Load blob if passed blob url