Firefox 57 marked a new era of the last remaining user agent, that actually puts the user first: XPCOM-based add-ons, that essentially monkey-patch the browser, were deprecated. While this is a good development for Mozilla and its users, it also left me without a usable
vi-like navigation. After a long period of more and more insane hacks to keep VimFx running, I have finally arrived at a relatively sane and easy to maintain solution.
First off, this is neither recommended nor endorsed by Mozilla or Fedora. It probably is fair to assume, that they'd be against you reversing the flow of time with regards to webextensions. Secondly, this won't magically forward-port APIs that have been dropped and your add-on might need. All I'm doing here is reinstating support for
install.rdf—bootstrapped extensions. If this doesn't work for you, maybe try Waterfox 68 (as of yet alpha and their security track record isn't great either).
make install(as root).
Let's dive into
It needs to be enabled by toggling some prefs in
defaults/pref/config-prefs.js. We also disable the sandbox, so we can run our code within the context and privileges of the whole browser (Mozilla actually wants to remove unsandboxed execution, which would break this current approach).
This will then load
config.js: First, we force-enable legacy extension in an awfully hacky way. Then, we register a new manifest file (
legacy.manifest) to register additional packages for the
resource:// preudo protocol. Now we can address the BootstrapLoader and RDF parser (located in
All this is neatly packaged up into a tarball that can be extracted on top of Firefox' install directory. The Makefile just packs all the files and (when issuing
install) extracts them to the correct location (Note: as of today, the path for Fedora's Firefox directory is hardcoded).
I hate footnotes, but some stuff I couldn't cram into the main text. Press your user agent's hotkey for
window.history.back() to get back to where you were coming from.
isPriviledged(), so you can't run webextensions_experiments). Since these values are not modifiable, I'm recreating the whole AddonSettings object. We also set the types of add-ons that require a signature to nothing, as there is one signature check that doesn't obey the runtime flag. Urgh.
chrome.manifestin Firefox' install directory, but that isn't being read in Firefox 68 any more and it also meant that any Firefox update would overwrite that again.