Follow

K, fuck it. AppImage is causing me issues where none of my web extensions are able to keep their history since they're being served from a different folder each time.

That and the fact that ublock origin is somehow busted is telling me it's time to rewrite how WebExtensions are bundled into Agregore.

One benefit of this will be the ability for users to mess with their installed extensions directly.

First: Removing all the old extensions and making sure there's a step to publish them as ZIPs

· · Web · 1 · 0 · 2

As part of this I've done some profiling of the startup time for Agregore (using console logs and my sense of time) and I found that reordering some of the initializing code can drastically improved perceived boot speed.

The main culprit was the `app.setAsDefaultProtocolClient` API. It's probably doing a bunch of sync API calls to the OS which is getting in the way. God I hate sync APIs. :P

I think for one or two protocols it's not a big deal, but in Agregore we're doing like 10 so it adds up.

Anyway, now I've changed how built in extensions work.

On build I add some zip files for extensions into the browsers binary along with version and name metadata.
On boot it will check if the extensions folder has an older version (or empty) for one of these builtins.
If so it'll extract the zip over top before all the extensions get loaded.

Also extension loading happens in parallel now

AHA! "Fixed" the Ublock Origin issue by reverting to version 1.47.4

1.48.0 added a fancy new thing for rendering icons and it seems my extension system doesn't support whatever this fanciness is.

github.com/gorhill/uBlock/rele

Could also be one of the patches since then though. 🤷

Adding new extensions and updating versions for extensions is now super easy.

All I need to do is add a new entry to a JSON file with a `url` for downloading the zip file for an extension, as well as a `version` string which is used to compare against the manifest on disk.

The URL also has some basic templating where the system will replace occurances of `{version}` with the version number. With this I just need to update the one line to update the version.

Also! While I'm at it I've added more mime types to the JSON renderer so now when I view ActivityStream data I can get a nice formatted view with clickable links. 😁

For anyone curious, here's the diff for the work I was doing: github.com/AgregoreWeb/agregor

Love me some deleted code 🥰

I'm especially happy with this file for tracking all the built in extensions. Should make it way easier to customize Agregore for communities.

github.com/AgregoreWeb/agregor

Sign in to participate in the conversation
Mauvestodon

Escape ship from centralized social media run by Mauve.