Add blob packaging method
I package the app by rewriting
index.html to replace the links to
dependencies.js with relative blob URLs. The build script,
blobbify.js, outputs the resulting blob ids, along with a markdown link and some URLs for convenience.
The build script does not connect to
ssb-server but adds blobs directly into the filesystem. It follows environmental variables
ssb_path, can be used with
go-sbot by setting
I implement "deslash" to ensure that the generated blob ids do not contain slashes, so they can be used with relative URLs where the blob id may or may not be URL-encoded.
This build technique works in
ssb-server. Try: http://localhost:8989/blobs/get/&Awi+rU8Xngiy9Kd51ekT18PBDWKwFTHrVzxTa5g9b3o=.sha256
It also works in patchfoo: http://localhost:8027/&Awi+rU8Xngiy9Kd51ekT18PBDWKwFTHrVzxTa5g9b3o=.sha256
It doesn't work in Oasis since the CSP is too strict.
It works somewhat with go-sbot's
ssb-ws. The stylesheet does not load since the Content-type is not correct.
It doesn't work in
git-ssb-web, because of the stylesheet Content-type and what looks like a bug causing the script to be truncated.
Content-type issues can be addressed for
ssb-ws by setting query string parameter
contentType= in the blob URL. Patchfoo also implements that interface. But git-ssb-web , go-sbot, and Oasis do not. A workaround for this could be to inline the stylesheet rather than load it from a blob. (Either programatically, or in the source). Or load it from a blob via XHR and adding it to the DOM.
I don't know if this can work with Manyverse or Planetary. I don't think either of them linkify blob IDs in messages. Manyverse runs a local HTTP server,
ssb-serve-blobs on port 26835. I'm not sure about
planetary-ios. But first would be to see if
Scuttle Shell Browser can work on Firefox for Android or iOS. It may be difficult since you don't have access to the user's secret file and can't load plugins. I don't know if Native Messaging works on mobile either.
I'm looking into Scuttle Shell Browser on mobile, right now I'm trying to compile Manyverse. The idea would be to a geckoview based screen. As I understand something like native messaging is possible for geckoview but not in the Firefox App. An alternative approach would be a Firefox add-on that uses an ssb-browser-demo approach (see also: %qTwq2Z6...).
Built with git-ssb-web