You are reading content from Scuttlebutt
@SoapDog %csKtp9VmxTjJoKy17O7GA6/3S8ou9Y9XLi8pZ/QgwKs=.sha256

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:

SSB Viewer - Firefox Developer Edition 2017-12-22 00.48.35.png

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
@tim %7DjyrYIylKi5S8wExMF1HDfe3KCSWzAlzFyIXsq3gd4=.sha256

This looks great @SoapDog

I've subscribed to #firefox but maybe you need a name - and a channel - specifically for this work?

@SoapDog %NKnWL+K7sWp4KBjljhu6/gvl62LE87h781lhD0+L5jg=.sha256

I have no idea how channels work or how they differ from hashtags... This is a good topic for the FAQ.

Thanks for the kind words. I wish the custom protocol API was more flexible so that I could add just "ssb:" as the protocol, the fact that I need to add it as "ext+ssb:" annoys the hell out of me. I will talk at the add-ons developer channels at Mozilla to see if they can change this API but I don't expect them to care much about my request, such niche cases.

About the extension, I think that maybe with ssb-ooo and some nice layouting, it become really useful. I also plan to add a view full thread link to the message.

@tim %TKv9KqROrfYY7TE9Z1Q0IVN5Xcxwyqcfey1QK1jOzU8=.sha256

As far as I can tell, it's enough to use a hashtag to create if necessary and post to a channel. They're just views I believe.

@arj has created a privacy setting to prevent content being rendered in the public ssb viewers. It might be nice if the extension took notice of that too. (And no that's not a subtle dig because you used my post - I'm perfectly happy about that so please don't worry!)

@ev @cel have you seen this? I think you'll both like it!

@SoapDog %omXq35LS/VokhiBK/EjElcchSTp4c8jpIzCgOVs0aL0=.sha256

I will make the extension honor that privacy setting. Be aware though that the extension is not a public ssb viewer, it is more close to patchlite running in your machine. The protocol will load a message if it is in your feed but the rendered message is not accessible outside of your browser, it is like a self-contained ssb viewer.

Also, even though you said you didn't had a problem with it, sorry for using that message. It was on top of my patchwork when I needed an ID to test and I do love that book. I will be more careful next time, even if it didn't worried you.

@tim %KZihd9gCzCCFEOQ1HZO05Zs0iYMTK7duRhAW+BEoLRM=.sha256

Ignore what I just said in my last post! :) I'm tired and not thinking straight.

I don't actually think there's any need really to honour that setting because as you point out you are just using the browser to render local content. Sorry for being slow to understand!

Even if it was on the public web it is not serious and no reason to worry - and it is a great book!

(As an aside I was reading a lecture by Umberto Eco this afternoon and thinking about storytelling and your thesis and games as a narrative form and how we need a channel to discuss all this but I'll pick that thread up again tomorrow or later not now.)

It's 1.40am here so I think I should get some sleep as I am struggling to think straight. Great work. Keep it up!

Join Scuttlebutt now